无法运行Qt应用程序:未找到版本"Qt_5"



i运行ubuntu 16.04 lts。我的问题是我无法运行QT5应用程序,我可以编译。

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

/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)

i然后删除了QT5并清除了所有残余物。然后我再次安装了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命令为

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

知道我会做什么错?

非常感谢!

,所以我根据以前的两个问题找出答案:

  • 执行错误的错误 -
  • 未发现QT_5'
  • 如何在linux中设置环境变量ld_library_path

要总结,要以正确的方式添加库,应该将自定义的.conf文件添加到包含所有绝对路径的文件夹CC_1,然后运行sudo ldconfig。:(

cpu:armv8OS:Linux Kylin.5.Desktop-Generic从5.6升级到5.9

发布程序后将出现类似的情况。

解决方案:

  1. 在目标PC中复制/usr/local/Qt-5.9.2/usr/local/复制。

  2. qtchooser -install qt5.9 /usr/local/Qt5.9.1/5.9.1/gcc_64/bin/qmake

  3. sudo bash -c "echo export QT_SELECT=qt5.9 >> /etc/profile"

  4. sudo ldconfig -v

相关内容

  • 没有找到相关文章

最新更新