安装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可以正常工作。