Ubuntu: Testing CUDA in Ubuntu 16.04: /usr/bin/ld: cannot find -lnvcuvid



Question:

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, among other things, is:

/usr/bin/ld: cannot find -lnvcuvid  

Related questions here and here 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 worths:

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


Solution:1

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/.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »