解决cuda库引用缺少文件导致的错误

1、错误

example1:

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!

example2:

W0824 08:12:09.782843 16027 dynamic_loader.cc:267] The third-party dynamic library (libcudnn.so) that Paddle depends on is not configured correctly. (error code is libcudnn.so: cannot open shared object file: No such file or directory)

2、解决

出现该类问题,主要原因还是cuda各种库文件缺少,按照下面操作即可

(1)下载库文件

cudnn-10.1-linux-x64-v8.0.2.39.tgz

(2)解压库文件后

路径位置:/home/username/demo/cuda

解决cuda库引用缺少文件导致的错误_第1张图片

 (3)设置库的路径

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

(4)再次执行

解决cuda库引用缺少文件导致的错误_第2张图片

解决cuda库引用缺少文件导致的错误_第3张图片 

 

 

你可能感兴趣的:(AI,gpu,paddle)