Eu também enfrentei o mesmo problema, no Ubuntu 14.04, x86_64 com o cuda 7.5.
Os avisos foram:
/usr/bin/ld: warning: libnvidia-tls.so.352.63, needed by /usr/lib/nvidia-352/libGL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvidia-glcore.so.352.63, needed by /usr/lib/nvidia-352/libGL.so, not found (try using -rpath or -rpath-link)
Esta foi a saída de ldd /usr/lib/nvidia-352/libGL.so
:
$ ldd /usr/lib/nvidia-352/libGL.so
linux-vdso.so.1 => (0x00007ffc1c5d4000)
libnvidia-tls.so.352.63 =>
libnvidia-glcore.so.352.63 =>
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f161512e000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f1614f1c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1614b57000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1614952000)
libm.so.6 => /lib/x86_64-linux-(0x00007f1615488000)gnu/libm.so.6 (0x00007f161464c000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f161442d000)
/lib64/ld-linux-x86-64.so.2 (0x0000557aa9c51000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1614228000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1614022000)
Eu adicionei a seguinte linha a ~/.zshrc
( ~/.bashrc
... se você estiver usando o bash):
export LD_LIBRARY_PATH=/usr/lib/nvidia-352:$LD_LIBRARY_PATH
Assim, a seguir estão as entradas relacionadas a cuda em my ~/.zshrc
:
export PATH=$PATH:/usr/local/cuda-7.5/bin
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib/nvidia-352:$LD_LIBRARY_PATH
Então eu obtive ~/.zshrc
source ~/.zshrc
Agora, ldd /usr/lib/nvidia-352/libGL.so
mostra:
linux-vdso.so.1 => (0x00007ffc1c5d4000)
libnvidia-tls.so.352.63 => tls/libnvidia-tls.so.352.63 (0x00007f1617f1c000)
libnvidia-glcore.so.352.63 (0x00007f1615488000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f161512e000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f1614f1c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1614b57000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1614952000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f161464c000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f161442d000)
/lib64/ld-linux-x86-64.so.2 (0x0000557aa9c51000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1614228000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1614022000)
Depois disso, o diretório make
inside NVIDIA_CUDA-7.5_Samples
foi concluído com êxito.