[problem help] WSL 应用打开报错
Tofloor
poster avatar
璃晨Kass
deepin
2023-08-30 23:56
Author

报错内容:deepin-terminal: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory

Reply Favorite View the author
All Replies
忘记、过去
deepin
2023-08-31 00:01
#1

sudo apt reinstall libqt5core5a 试试?不至于环境变量有问题吧......

Reply View the author
babyfengfjx
Super Moderator
CQA
2023-08-31 00:14
#2

这个还没实际用过,不过之前内部使用过程总结的内容可能有一定帮助:适配wsl的deepin根文件系统的配置和使用

Reply View the author
璃晨Kass
deepin
2023-08-31 00:30
#3
忘记、过去

sudo apt reinstall libqt5core5a 试试?不至于环境变量有问题吧......

试了无效果

Reply View the author
owen_337
deepin testing team
2023-08-31 01:05
#4

楼主可以看下此路径下是否存在这个文件/usr/lib/x86_64-linux-gnu/libQt5Core.so.5

如果有,还报错,可以尝试在/usr/bin/deepin-terminal,来个软链接试试:sudo ln -sf /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 /usr/bin/

如果没有,请安装一下:sudo apt-get install libqt5core5a

Reply View the author
owen_337
deepin testing team
2023-08-31 01:08
#5

wsl应用的话,做个软链接到你要执行的应用目录下,应该就能解决

Reply View the author
璃晨Kass
deepin
2023-08-31 01:22
#6
owen_337

楼主可以看下此路径下是否存在这个文件/usr/lib/x86_64-linux-gnu/libQt5Core.so.5

如果有,还报错,可以尝试在/usr/bin/deepin-terminal,来个软链接试试:sudo ln -sf /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 /usr/bin/

如果没有,请安装一下:sudo apt-get install libqt5core5a

/usr/lib/x86_64-linux-gnu/libQt5Core.so.5 路径下有这个文件

使用sudo ln -sf /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 /usr/bin/时报错没有ln命令

Reply View the author
owen_337
deepin testing team
2023-08-31 01:26
#7
璃晨Kass

/usr/lib/x86_64-linux-gnu/libQt5Core.so.5 路径下有这个文件

使用sudo ln -sf /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 /usr/bin/时报错没有ln命令

噢,你是wsl的环境doubt

Reply View the author
owen_337
deepin testing team
2023-08-31 01:32
#8

这样试试:

1、确认你的WSL中是否安装了Qt5开发环境

sudo apt-get update
sudo apt-get install qt5-default

2、找看看

sudo find / -name libQt5Core.so.5 当然这个路径你已经找到了

3、将其路径添加到LD_LIBRARY_PATH环境变量中,如果是/usr/local/lib,就是这个文件的路径(只用给到文件的目录即可)

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

export是临时生效,如果能够解决,可以将这段加入到/etc/profile文件中,source 一下

Reply View the author