完整问题描述:error while loading shared libraries: libcudnn.so.*: cannot open shared object file: No such file or directory(已确保其存在,且生成软链接,环境变量也没问题)
解决:
1.只在.bashrc中,添加环境变量,有时不能解决,切换到root用户,用如下命令,可解决
# sudo echo "/usr/local/cuda-9.0/lib64" > /etc/ld.so.conf.d/cuda.conf
# sudo ldconfig
2.也可能是tensorflow版本的问题,tensorflow各版本要求对应的cuda版本和cudnn版本,见https://blog.csdn.net/omodao1/article/details/83241074