1. 程式人生 > >/usr/bin/ld:/usr/local/cuda/lib64/libcudnn.so: file format not recognized; treating as linker script

/usr/bin/ld:/usr/local/cuda/lib64/libcudnn.so: file format not recognized; treating as linker script

/usr/bin/ld:/usr/local/cuda/lib64/libcudnn.so: file format not recognized; treating as linker script 
/usr/bin/ld:/usr/local/cuda/lib64/libcudnn.so:1: syntax error 
collect2: error: ld returned 1 exit status 
Makefile:573: recipe for target ‘.build_release/lib/libcaffe.so.1.0.0’ failed 
make: * [.build_release/lib/libcaffe.so.1.0.0] Error 1 
 

解決方法: 
移除除libcudnn.so.7.0.1以外的libcudnn.so檔案 
/usr/local/cuda/lib64$ sudo rm -rf libcudnn.so libcudnn.so.7 
重新生成 
sudo ln -s libcudnn.so.7.0.1 libcudnn.so.7 
sudo ln -s libcudnn.so.7 libcudnn.so 
然後

make clean 
make all