(wsl2中)Ubuntu paddlepaddle安装验证阶段 paddle.utils.run_check() 报错

前言:博主按照某博主教程的教程成功安装cuda11.7和cudnn8.4.1后,按照paddle官方教程继续安装paddlepaddle,

 安装一切顺利,直到最后一步验证

在输入 paddle.utils.run_check()后发生报错如下

 

>>> import paddle
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ... 
I0810 15:20:13.888904 21495 interpretercore.cc:237] New Executor is Running.
W0810 15:20:13.889133 21495 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 12.0, Runtime API Version: 11.7
W0810 15:20:13.892621 21495 gpu_resources.cc:149] device: 0, cuDNN Version: 8.4.
W0810 15:20:15.356758 21495 dynamic_loader.cc:303] The third-party dynamic library (libcuda.so) that Paddle depends on is not configured correctly. (error code is libcuda.so: cannot open shared object file: No such file or directory)
  Suggestions:
  1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
  2. Configure third-party dynamic library environment variables as follows:
  - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...`
  - Windows: set PATH by `set PATH=XXX;


--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
No stack trace in paddle, may be caused by external reasons.

----------------------
Error Message Summary:
----------------------
FatalError: `Segmentation fault` is detected by the operating system.
  [TimeInfo: *** Aborted at 1691652015 (unix time) try "date -d @1691652015" if you are using GNU date ***]
  [SignalInfo: *** SIGSEGV (@0x0) received by PID 21495 (TID 0x7ff845ff8100) from PID 0 ***]

Segmentation fault

其中关键信息如下 :The third-party dynamic library (libcuda.so) that Paddle depends on is not configured correctly. (error code is libcuda.so: cannot open shared object file: No such file or directory) 

报错显示我们没有licuda.so库

参考之前的安装教程中添加的环境变量,我前去查看,发现果然没有libcuda.so

(按照字典序libcuda.so应该出现在这里)

于是我进行寻找

sudo find /usr -name libcuda.so*

看到第一个,我想肯定是wsl的问题,于是我添加链接将第一个位置的libcuda放入/usr/local/cuda-11.7/lib64中

sudo ln -s /usr/lib/wsl/lib/libcuda.so /usr/local/cuda-11.7/lib64

 

出现了,再进行一次paddle的验证

显示安装成功,搞定。 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值