【Error】cuda缺少文件

错误描述

Could not load library libcudnn_ops_infer.so.8. Error: libcudnn_ops_infer.so.8: cannot open shared object file: No such file or directory
Please make sure libcudnn_ops_infer.so.8 is in your library path!

解决方法

查找文件的命令
find /home/root -name ‘libcudnn_ops_infer.so.8’

1)下载库文件
cudnn-10.1-linux-x64-v8.0.2.39.tgz

2)解压库文件后

路径位置:/home/username/demo/cuda
3)设置库的路径

export LD_LIBRARY_PATH=.:/usr/local/cuda-10.2/lib64:/home/username/demo/cuda/lib64

参考资料

https://blog.csdn.net/qq_23953717/article/details/119893460

你可能感兴趣的:(Error,CUDA)