how to reinstall cudnn?

Viewed 22487

After install Cudnn.4.0.4, I find if I want to run the code I have downloaded, I need a higher version of Cudnn. Then I download cudnn-7.0-linux-x64-v4.0-prod.tgz and directly install by following order:

 $ sudo cp include/cudnn.h /usr/local/include
 $ sudo cp lib64/libcudnn.* /usr/local/lib
 $ sudo ln -sf /usr/local/lib/libcudnn.so.4.0.7 /usr/local/lib/libcudnn.so.4
 $ sudo ln -sf /usr/local/lib/libcudnn.so.4 /usr/local/lib/libcudnn.so
 $ sudo ldconfig -v

While I running sudo ldconfig -v, there is an error:

/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.4 is not a symbolic link

I run the source code again and have the same error before I reinstall cudnn:

 luajit: /home/zhfu/torch/install/share/lua/5.1/cudnn/ffi.lua:1287: These bindings are for version 4005 or above, while the loaded CuDNN is version: 4004  
 Are you using an older version of CuDNN?
 stack traceback:
    [C]: in function 'error'
    /home/zhfu/torch/install/share/lua/5.1/cudnn/ffi.lua:1287: in main chunk
    [C]: in function 'require'
    /home/zhfu/torch/install/share/lua/5.1/cudnn/init.lua:4: in main chunk
    [C]: in function 'require'
    ./main.lua:329: in main chunk
    [C]: at 0x00406670

Can somebody helps me to fix this problem?

3 Answers

if you installed CUDNN using the following command on RHEL / Centos,

sudo rpm -ivh libcudnn8-8.0.1.13-1.cuda11.0.x86_64.rpm

sudo rpm -ivh libcudnn8-devel-8.0.1.13-1.cuda11.0.x86_64.rpm

sudo rpm -ivh libcudnn8-doc-8.0.1.13-1.cuda11.0.x86_64.rpm 

We can remove the same by using

sudo yum remove libcudnn*
Related