I've followed the steps of the NVIDIA CUDA Installation Guide and I've installed CUDA without warning or errors.

Problems arrive when I try to compile the samples provided in the CUDA toolkit. Citing the dedicated section in the previous guide: "You should compile them by changing to ~/NVIDIA_CUDA-8.0_Samples and typing make".

The output includes this:

/usr/bin/ld: cannot find -lnvcuvid

After reading related questions "/usr/bin/ld: cannot find -lcudart" and this on Stack Overflow, I checked whether lnvcuvid exists and apparently the file is missing.

$ ls /usr/local/cuda/lib64
libcublas_device.a     libcusparse_static.a  libnppisu.so
libcublas.so           libnppc.so            libnppisu.so.8.0
libcublas.so.8.0       libnppc.so.8.0        libnppisu.so.8.0.61
libcublas.so.8.0.61    libnppc.so.8.0.61     libnppitc.so
libcublas_static.a     libnppc_static.a      libnppitc.so.8.0
libcudadevrt.a         libnppial.so          libnppitc.so.8.0.61
libcudart.so           libnppial.so.8.0      libnpps.so
libcudart.so.8.0       libnppial.so.8.0.61   libnpps.so.8.0
libcudart.so.8.0.61    libnppicc.so          libnpps.so.8.0.61
libcudart_static.a     libnppicc.so.8.0      libnpps_static.a
libcufft.so            libnppicc.so.8.0.61   libnvblas.so
libcufft.so.8.0        libnppicom.so         libnvblas.so.8.0
libcufft.so.8.0.61     libnppicom.so.8.0     libnvblas.so.8.0.61
libcufft_static.a      libnppicom.so.8.0.61  libnvgraph.so
libcufftw.so           libnppidei.so         libnvgraph.so.8.0
libcufftw.so.8.0       libnppidei.so.8.0     libnvgraph.so.8.0.61
libcufftw.so.8.0.61    libnppidei.so.8.0.61  libnvgraph_static.a
libcufftw_static.a     libnppif.so           libnvrtc-builtins.so
libcuinj64.so          libnppif.so.8.0       libnvrtc-builtins.so.8.0
libcuinj64.so.8.0      libnppif.so.8.0.61    libnvrtc-builtins.so.8.0.61
libcuinj64.so.8.0.61   libnppig.so           libnvrtc.so
libculibos.a           libnppig.so.8.0       libnvrtc.so.8.0
libcurand.so           libnppig.so.8.0.61    libnvrtc.so.8.0.61
libcurand.so.8.0       libnppim.so           libnvToolsExt.so
libcurand.so.8.0.61    libnppim.so.8.0       libnvToolsExt.so.1
libcurand_static.a     libnppim.so.8.0.61    libnvToolsExt.so.1.0.0
libcusolver.so         libnppi.so            libOpenCL.so
libcusolver.so.8.0     libnppi.so.8.0        libOpenCL.so.1
libcusolver.so.8.0.61  libnppi.so.8.0.61     libOpenCL.so.1.0
libcusolver_static.a   libnppi_static.a      libOpenCL.so.1.0.0
libcusparse.so         libnppist.so          stubs
libcusparse.so.8.0     libnppist.so.8.0
libcusparse.so.8.0.61  libnppist.so.8.0.61

However, I don't know where to safely get the file from so I'm stuck. For what it's worth:

  • nvcc is already added in PATH.
  • In usr/local I have either cuda and cuda-8.0 folders. I'm not sure if this is normal.

2 Answers 2


The answer is provided in the post #17 here. I'm copy pasting for your convenience:

A lazy fix would be to run (for cuda 8.0):

find . -type f -execdir sed -i 's/UBUNTU_PKG_NAME = "nvidia-367"/UBUNTU_PKG_NAME = "nvidia-375"/g' '{}' \;

in ~/NVIDIA_CUDA-8.0_Samples/.


I had the same issue, my solution is the same as the one of MLguy: make a symbolic link of libnvcuvid.so in /usr/lib/.

sudo ln -s /usr/lib/nvidia-367/libnvcuvid.so /usr/lib/libnvcuvid.so
sudo ln -s /usr/lib/nvidia-367/libnvcuvid.so.1 /usr/lib/libnvcuvid.so.1

Where nvidia-367 depends on your computer setup.

To adapt the command to your computer, this command might help: find /usr/ -name 'libnvcuvid.so'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .