TensorRT 4 installation - libcudnn.so.7 is not a symbolic link

Hi,
I’m installing TensorRT following the http://docs.nvidia.com/deeplearning/sdk/tensorrt-install-guide/index.html

System info: Driver Version: 384.130, Tesla V100-PCIE…, CUDA 9.0, cudnn 7.0

md5sum downloads/nv-tensorrt-repo-ubuntu1604-cuda9.0-rc-trt4.0.0.3-20180329_1-1_amd64.deb
a861dda8820bb4510b39371afae53abe

sudo apt-get install tensorrt
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libcudnn7 libcudnn7-dev libnvinfer-dev libnvinfer-samples libnvinfer4
The following NEW packages will be installed:
  libcudnn7 libcudnn7-dev libnvinfer-dev libnvinfer-samples libnvinfer4 tensorrt
0 upgraded, 6 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/440 MB of archives.
After this operation, 1,640 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 file:/var/nv-tensorrt-repo-cuda9.0-rc-trt4.0.0.3-20180329  libcudnn7 7.0.5.15-1+cuda9.0 [103 MB]
Get:2 file:/var/nv-tensorrt-repo-cuda9.0-rc-trt4.0.0.3-20180329  libcudnn7-dev 7.0.5.15-1+cuda9.0 [92.9 MB]
Get:3 file:/var/nv-tensorrt-repo-cuda9.0-rc-trt4.0.0.3-20180329  libnvinfer4 4.1.0-1+cuda9.0 [23.2 MB]
Get:4 file:/var/nv-tensorrt-repo-cuda9.0-rc-trt4.0.0.3-20180329  libnvinfer-dev 4.1.0-1+cuda9.0 [24.1 MB]
Get:5 file:/var/nv-tensorrt-repo-cuda9.0-rc-trt4.0.0.3-20180329  libnvinfer-samples 4.1.0-1+cuda9.0 [196 MB]
Get:6 file:/var/nv-tensorrt-repo-cuda9.0-rc-trt4.0.0.3-20180329  tensorrt 4.0.0.3-1+cuda9.0 [1,509 kB]
Selecting previously unselected package libcudnn7.
(Reading database ... 155558 files and directories currently installed.)
Preparing to unpack .../libcudnn7_7.0.5.15-1+cuda9.0_amd64.deb ...
Unpacking libcudnn7 (7.0.5.15-1+cuda9.0) ...
Selecting previously unselected package libcudnn7-dev.
Preparing to unpack .../libcudnn7-dev_7.0.5.15-1+cuda9.0_amd64.deb ...
Unpacking libcudnn7-dev (7.0.5.15-1+cuda9.0) ...
Selecting previously unselected package libnvinfer4.
Preparing to unpack .../libnvinfer4_4.1.0-1+cuda9.0_amd64.deb ...
Unpacking libnvinfer4 (4.1.0-1+cuda9.0) ...
Selecting previously unselected package libnvinfer-dev.
Preparing to unpack .../libnvinfer-dev_4.1.0-1+cuda9.0_amd64.deb ...
Unpacking libnvinfer-dev (4.1.0-1+cuda9.0) ...
Selecting previously unselected package libnvinfer-samples.
Preparing to unpack .../libnvinfer-samples_4.1.0-1+cuda9.0_amd64.deb ...
Unpacking libnvinfer-samples (4.1.0-1+cuda9.0) ...
Selecting previously unselected package tensorrt.
Preparing to unpack .../tensorrt_4.0.0.3-1+cuda9.0_amd64.deb ...
Unpacking tensorrt (4.0.0.3-1+cuda9.0) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
/sbin/ldconfig.real: /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7 is not a symbolic link

Setting up libcudnn7 (7.0.5.15-1+cuda9.0) ...
Setting up libcudnn7-dev (7.0.5.15-1+cuda9.0) ...
update-alternatives: using /usr/include/x86_64-linux-gnu/cudnn_v7.h to provide /usr/include/cudnn.h (libcudnn) in auto mode
Setting up libnvinfer4 (4.1.0-1+cuda9.0) ...
Setting up libnvinfer-dev (4.1.0-1+cuda9.0) ...
Setting up libnvinfer-samples (4.1.0-1+cuda9.0) ...
Setting up tensorrt (4.0.0.3-1+cuda9.0) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
/sbin/ldconfig.real: /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7 is not a symbolic link

I’m concerned about double message “libcudnn.so.7 is not a symbolic link” (lines 42 and 52)

Should I try simple workaround with renaming libcudnn.so.7 and creating link to that file?

Hello,

I had the same problem with you, and I figured it out like this:

  1. check the link:
    sudo ldconfig -v

  2. Find the error:
    /sbin/ldconfig.real: /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7 is not a symbolic link
    libcudnn.so.7 -> libcudnn.so.7.0.5

  3. Create the new link manually:
    sudo ln -sf /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7.0.5 /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7

This solution works for me, may it could help!

1 Like

You can just add the symbolic link to the cudnn files you added to /usr/local/cuda-9.0/lib64
Make sure the permissions and symbolic links match the other library files in the directory.

To confirm it works as above:
sudo ldconfig -v | grep cudnn

and you should see:
libcudnn.so.7 -> libcudnn.so.7.0.5