Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to reinstall cudnn?

Tags:

c++

linux

lua

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?

like image 688
Mata Fu Avatar asked Mar 21 '16 17:03

Mata Fu


People also ask

How do I know cuDNN is installed?

Step 1: Register an nvidia developer account and download cudnn here (about 80 MB). You might need nvcc --version to get your cuda version. Step 2: Check where your cuda installation is. For most people, it will be /usr/local/cuda/ .

Which version of cuDNN should I install?

You should use whichever is the latest version of cuDNN supported by your application and platform, since that will have the most bug fixes and enhancements. And yes, cuDNN versions depend on specific cuda versions. That is spelled out in the download page.


2 Answers

Just delete all related files both in /usr/local/lib and in /usr/local/cuda/lib64 That's work for me.

like image 102
Mata Fu Avatar answered Sep 21 '22 06:09

Mata Fu


In Linux, it looks like this:

sudo rm -r /usr/local/cuda-xxx/lib64/libcudnn*

cuda-xxx stand for cuda version: e.g 7.5 or 8.0

run the one of the following commands:

sudo rm -r /usr/local/cuda-7.5/lib64/libcudnn*

or

sudo rm -r /usr/local/cuda-8.0/lib64/libcudnn*

like image 42
mase_cv_ml Avatar answered Sep 20 '22 06:09

mase_cv_ml