qt运行报错:ould not find or load the Qt platform plugin "linuxfb",解决办法

安装qt5.9.5后进行测试,发生错误:

This application failed to start because it could not find or load the Qt platform plugin "linuxfb"
in "/home/qt/plugins".

Available platform plugins are: linuxfb, minimal, offscreen, vnc.

Reinstalling the application may fix this problem.
Aborted

查找相关博客的解决方法都没有解决问题,后根据https://blog.csdn.net/qq_42138566/article/details/82842838提示,可能是lib动态库文件的缺少,但是添加了相应的库文件依然没有解决。最后发现问题出现在环境变量的配置上,在qt的环境变量中LD_LIBRARY_PATH没有添加相应的路径,从而无法查找到库文件。更改这行代码为

export LD_LIBRARY_PATH=/opt/qt5.9.5/lib:/lib:/usr/lib:/usr/local/tslib/lib
重启系统,再次测试,qt5可以正常工作。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值