无法运行 Qt 应用程序:未找到版本“Qt_5" [英] Can't run Qt apps: version `Qt_5' not found

查看:87
本文介绍了无法运行 Qt 应用程序:未找到版本“Qt_5"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行的是 Ubuntu 16.04 LTS.我的问题是我无法运行可以编译的 Qt5 应用程序.

I run Ubuntu 16.04 LTS. My problem is that I am not able to run a Qt5 app, which I can compile.

这是我尝试运行它时得到的:

This is what I get when I try to run it:

/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.6' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)
/home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by /home/user/Desktop/sconfig/dist/Release/GNU-Linux/SCongif)

然后我删除了 Qt5 并清除了所有残余.然后我又安装了Qt5.

I then removed Qt5 and purged all the remnants. Then I installed again Qt5.

user@user-P64V7:~$ which qmake
/home/user/Qt5.8.0/5.8/gcc_64/bin/qmake
user@user-P64V7:~$ qmake --version
QMake version 3.1
Using Qt version 5.8.0 in /home/user/Qt5.8.0/5.8/gcc_64/lib
user@user-P64V7:~$ echo $PATH
/home/user/Qt5.8.0/5.8/gcc_64/bin:/home/user/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

值得注意的是,我使用的是 Netbeans 8.2 并且 QMake 命令是

It could also be worth noting that I use Netbeans 8.2 and the QMake command is

/home/user/Qt5.8.0/5.8/gcc_64/bin/qmake

知道我做错了什么吗?

非常感谢!

推荐答案

于是我根据前两个问题想出了一个答案:

So I figured out an answer according to these two previous questions:

总而言之,要以正确的方式添加库,应将自定义 .conf 文件添加到文件夹 /etc/ld.so.conf.d 中,其中包含库文件夹的所有绝对路径,然后运行 ​​sudo ldconfig.:)

To summarize, to add the libraries the right way, one should add a custom .conf file to the folder /etc/ld.so.conf.d containing all the absolute paths to library folders and then run sudo ldconfig. :)

这篇关于无法运行 Qt 应用程序:未找到版本“Qt_5"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆