未找到 qtcreator Qt_5 [英] qtcreator Qt_5 not found

查看:54
本文介绍了未找到 qtcreator Qt_5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我在 Ubuntu 16.04 下启动 qtcreator 时遇到问题.报的错误是:

qtcreator:/usr/bin/../lib/x86_64-linux-gnu/qtcreator/../libQt5Gui.so.5:未找到版本`Qt_5_PRIVATE_API'(/usr/lib/libQt5Widgets 需要).so.5)qtcreator:/usr/bin/../lib/x86_64-linux-gnu/qtcreator/../libQt5Gui.so.5:找不到版本`Qt_5'(/usr/lib/libQt5Widgets.so.5需要)

我尝试了与其他线程不同的解决方案,但无法实现.任何人都可以帮助或解释到底是什么问题?几天前我能够运行 qtcreator,但是当我今天尝试时出现此错误.我觉得可能是安装了一些应用,可惜不能说是哪一个,只好装了几个.

更多信息:

qmake --versionQMake 3.0 版在/usr/lib/x86_64-linux-gnu 中使用 Qt 5.5.1 版

我只从官方仓库安装了qt版本,安装了以下文件:

  • /usr/lib/libQt5Core.so.5.7.0
  • /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7
  • /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1

会不会是配置有问题?有没有办法重新配置路径?

可能也很有趣,在我无法运行 qtcreator 的同时,我也无法从 ros-kinetic-package 中运行 rviz.

rviz此应用程序无法启动,因为它无法找到或加载 Qt 平台插件xcb"在 "".重新安装应用程序可能会解决此问题.中止(核心转储)

我尝试清除rviz、ros、qtcreator并重新安装它,我安装了qt5-default,但无法解决我的问题.感谢您的帮助.

好的,我花了一些时间并再次从这里尝试解决方案:执行错误 - 未找到所需的版本 `Qt_5'这部分解决了问题.使用 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/qtcreator 我可以再次启动 qtcreator.但这当然根本不能解决问题,我该如何重新配置​​.

编辑 2:LD_LIBRARY_PATH 解决方案对 rviz 问题没有帮助,它告诉我:

LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/rvizrviz:加载共享库时出错:librviz.so:无法打开共享对象文件:没有这样的文件或目录

然后我尝试了

LD_LIBRARY_PATH=/opt/ros/kinetic/lib rviz

有趣的是,这让 rviz 得以上线.

所以看起来我的路径很混乱,问题是为什么以及如何修复它们(将 Qt5.7 库和链接移动到另一个目录是否有帮助)?

(最后要注意的是,其他 ros 工具如 rqt_console、rqt_plot、...也会失败,如果我没有在调用之前添加 LIBRARY_PATH.

编辑 3:所以我想我在里面发现了更多.我有一台来自 FLIR 的相机,它使用了一个名为 spinnaker 的库.要安装,必须安装一堆 .deb 包.其中之一是 spinview_qt-.deb.它包含 QT5.7 版本并安装到/usr/lib.

dpkg --contents spinview-qt-1.10.0.31_amd64.debdrwxr-xr-x 根/根 0 2017-12-21 23:31 ./drwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/drwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/share/drwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/share/pixmaps/-rw-r--r-- root/root 129041 2017-12-21 23:31 ./usr/share/pixmaps/SpinnakerIcon.icodrwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/share/applications/-rw-r--r-- root/root 154 2017-12-21 23:31 ./usr/share/applications/spinview.desktopdrwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/share/doc/drwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/-rw-r--r-- root/root 9190 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/Apache_2.0.txt-rw-r--r-- root/root 623763 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/Spinnaker-Open-Source-Licenses.pdf-rw-r--r-- root/root 1485 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/FreeBSD.txt-rw-r--r-- root/root 27032 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/lgpl_2.1.txt-rw-r--r-- root/root 1337 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/boost_license.txt-rw-r--r-- root/root 981 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/FLIR_license.txt-rw-r--r-- root/root 1597 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/genicam_license.txt-rw-r--r-- root/root 251 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/changelog.gz-rw-r--r-- root/root 5387 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/OpenTK_license.txt-rw-r--r-- root/root 17577 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/freeimage_license.txt-rw-r--r-- root/root 20993 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/WPCC_BY_SA_license.txt-rw-r--r-- root/root 7816 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/lgpl_3.0.txt-rw-r--r-- root/root 25864 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/lgpl_2.0.txt-rw-r--r-- root/root 2232 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/CLALLSERIAL_license.txt-rw-r--r-- root/root 10439 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/CPOL_1.02.txtdrwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/lib/-rw-r--r-- root/root 5339752 2017-12-21 22:48 ./usr/lib/libQt5Core.so.5.7.0-rw-r--r-- root/root 25047100 2017-12-21 22:48 ./usr/lib/libicudata.so.56.1-rw-r--r-- root/root 1365560 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so.5.7.0-rw-r--r-- root/root 1432320 2017-12-21 22:48 ./usr/lib/libQt5Network.so.5.7.0-rw-r--r-- root/root 5909528 2017-12-21 22:48 ./usr/lib/libQt5Gui.so.5.7.0-rw-r--r-- root/root 356208 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so.5.7.0-rw-r--r-- root/root 6614408 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so.5.7.0-rw-r--r-- root/root 3374854 2017-12-21 22:48 ./usr/lib/libicui18n.so.56.1-rw-r--r-- root/root 2070162 2017-12-21 22:48 ./usr/lib/libicuuc.so.56.1-rw-r--r-- root/root 527104 2017-12-21 22:48 ./usr/lib/libQt5DBus.so.5.7.0drwxr-xr-x 根/根 0 2017-12-21 23:31 ./usr/bin/-rwxr-xr-x 根/根 852544 2017-12-21 23:07 ./usr/bin/SpinView_QTdrwxr-xr-x 根/根 0 2017-12-20 02:45 ./usr/bin/platforms/-rw-r--r-- root/root 303544 2017-12-20 02:45 ./usr/bin/platforms/libqlinuxfb.so-rw-r--r-- root/root 10192 2017-12-20 02:45 ./usr/bin/platforms/libqxcb.so-rw-r--r-- root/root 141072 2017-12-20 02:45 ./usr/bin/platforms/libqoffscreen.so-rw-r--r-- root/root 176720 2017-12-20 02:45 ./usr/bin/platforms/libqminimalegl.so-rw-r--r-- root/root 140592 2017-12-20 02:45 ./usr/bin/platforms/libqminimal.so-rw-r--r-- root/root 9968 2017-12-20 02:45 ./usr/bin/platforms/libqeglfs.so-rwxr-xr-x 根/根 70 2017-12-20 02:47 ./usr/bin/spinviewlrwxrwxrwx root/root 0 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/LICENSE ->FLIR_license.txtlrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so.5 ->libQt5XcbQpa.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Gui.so.5.7 ->libQt5Gui.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so.5.7 ->libQt5XcbQpa.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Network.so.5 ->libQt5Network.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Gui.so ->libQt5Gui.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so ->libQt5XcbQpa.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so.5.7 ->libQt5OpenGL.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Network.so ->libQt5Network.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Gui.so.5 ->libQt5Gui.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5DBus.so ->libQt5DBus.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Core.so ->libQt5Core.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so.5 ->libQt5Widgets.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so ->libQt5OpenGL.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libicuuc.so.56 ->libicuuc.so.56.1lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Network.so.5.7 ->libQt5Network.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Core.so.5.7 ->libQt5Core.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libicudata.so.56 ->libicudata.so.56.1lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5DBus.so.5 ->libQt5DBus.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so ->libQt5Widgets.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so.5.7 ->libQt5Widgets.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5DBus.so.5.7 ->libQt5DBus.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libicui18n.so.56 ->libicui18n.so.56.1lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so.5 ->libQt5OpenGL.so.5.7.0lrwxrwxrwx root/root 0 2017-12-21 22:48 ./usr/lib/libQt5Core.so.5 ->libQt5Core.so.5.7.0

我认为问题可能是 Ubuntu 在查找/usr/lib/x86_64-linux-gnu 之前尝试在/usr/bin 中查找 QT5.所以我的问题是,如何再次默认使用 QT5.5.1 版本来实现 Ubuntu?我可以配置它还是现在必须始终添加 LD_LIBRARY_PATH?如何卸载 QT5.7 库?只是删除上面列出的文件?

解决方案

Qtcreator 和 rviz 不起作用,因为它们需要来自 /usr/lib/x86_64-linux-gnu 的 qt 库,但与/usr/lib/libQt* 代替(您可以使用 ldd $(which qtcreator)ldd $(which rviz) 仔细检查它).这种混乱确实与您的相机包安装有很大关系.

我认为有几种方法可以解决这个问题:

1.看起来您的链接器优先于 /usr/lib 而不是 /usr/lib/x86_64-linux-gnu.检查您的 LD_LIBRARY_PATH:

echo $LD_LIBRARY_PATH

并且如果它包含 /usr/lib - 尝试摆脱它(您必须跟踪更新 LD_LIBRARY_PATH 的位置 - 它在 .bashrc 或其他地方?也许 /etc/ld.so.conf.d?)

2..bashrc 中设置您的 LD_LIBRARY_PATH 以指向一个有效的 qt 目录.记住不要覆盖变量,而是扩展它(把它放在 ~/.bashrc 的末尾):

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH

然后重新加载.bashrc:

<预><代码>.~/.bashrc

在您的实验中,您在启动 qtcreatorrviz 时进行了覆盖,因此这两个应用程序中只有一个可以运行取决于 LD_LIBRARY_PATH你设置.

或者,您可以在 /etc/ld.so.conf.d/ 中添加 /usr/lib/x86_64-linux-gnu/ 路径 - 只需创建一个带有 qt 路径的新 .conf 文件并使用

重新加载所有内容

sudo ldconfig

使用此方法将可能破坏您的相机包,因为从现在开始它将与您的新路径中的库链接.

3.将随相机包 (/usr/lib/libQt*) 提供的 Qt 库临时移动到另一个位置,并检查 spinview 是否适用于 5.7 以外的其他版本的 qt.如果是 - 您可以自由地从 /usr/lib/ 中删除 qt5.7 库,因为它们不是必需的 - 这里不需要复杂的卸载过程.无论如何,您始终可以使用您的相机 .deb 包恢复它.

Hello I have a problem starting qtcreator under Ubuntu 16.04. The reported error is:

qtcreator: /usr/bin/../lib/x86_64-linux-gnu/qtcreator/../libQt5Gui.so.5: version `Qt_5_PRIVATE_API' not found (required by /usr/lib/libQt5Widgets.so.5)
qtcreator: /usr/bin/../lib/x86_64-linux-gnu/qtcreator/../libQt5Gui.so.5: version `Qt_5' not found (required by /usr/lib/libQt5Widgets.so.5)

I tried different solutions from other threads but can't make it. Can anyone help or explain what exactly the problem is? A few days ago I was able to run qtcreator, but when I tried today I got this error. I think it may correspond to the installation of some application, unfortunately I can't say which one, I had to install a few.

Some more information:

qmake --version
QMake version 3.0
Using Qt version 5.5.1 in /usr/lib/x86_64-linux-gnu

I have only qt versions installed from the official repositories, there are following files installed:

  • /usr/lib/libQt5Core.so.5.7.0
  • /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7
  • /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1

Could there be a configuration problem? Is there a way to reconfigure the paths?

Probably interesting, too, the same moment I can't run qtcreator I can't run rviz from the ros-kinetic-package.

rviz
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Reinstalling the application may fix this problem.
Aborted (core dumped)

I tried to purge rviz, ros, qtcreator and installed it again, I installed qt5-default, but couldn't solve my problem. Thank you for your help.

Edit: Okay I took some time and tried the solution from here again: Error on execution -version `Qt_5' not found required by and this partially solves the problem. With LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ qtcreator I can start qtcreator again. But this of course doesn't solve the problem at all, how can I reconfigure it.

Edit 2: The LD_LIBRARY_PATH solution doesn't help for the rviz problem, it tells me:

LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/ rviz
rviz: error while loading shared libraries: librviz.so: cannot open shared object file: No such file or directory

I then tried

LD_LIBRARY_PATH=/opt/ros/kinetic/lib rviz

which interestingly brought rviz to live.

So it seems that my paths are confused, the question is why and how to repair them (does it help to move the Qt5.7 libs and links to another directory)?

(Last thing to note, the other ros tools as rqt_console, rqt_plot, ... fail, too, if I don't add the LIBRARY_PATH in advance of the call.

EDIT 3: So I think I found out a little more inside. I have a camera from FLIR, which uses a library called spinnaker. To install, one has to install a bunch of .deb packages. One of these is spinview_qt-.deb. It contains the QT5.7 version and installs to /usr/lib.

dpkg --contents spinview-qt-1.10.0.31_amd64.deb 
drwxr-xr-x root/root         0 2017-12-21 23:31 ./
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/share/
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/share/pixmaps/
-rw-r--r-- root/root    129041 2017-12-21 23:31 ./usr/share/pixmaps/SpinnakerIcon.ico
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/share/applications/
-rw-r--r-- root/root       154 2017-12-21 23:31 ./usr/share/applications/spinview.desktop
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/share/doc/
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/
-rw-r--r-- root/root      9190 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/Apache_2.0.txt
-rw-r--r-- root/root    623763 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/Spinnaker-Open-Source-Licenses.pdf
-rw-r--r-- root/root      1485 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/FreeBSD.txt
-rw-r--r-- root/root     27032 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/lgpl_2.1.txt
-rw-r--r-- root/root      1337 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/boost_license.txt
-rw-r--r-- root/root       981 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/FLIR_license.txt
-rw-r--r-- root/root      1597 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/genicam_license.txt
-rw-r--r-- root/root       251 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/changelog.gz
-rw-r--r-- root/root      5387 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/OpenTK_license.txt
-rw-r--r-- root/root     17577 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/freeimage_license.txt
-rw-r--r-- root/root     20993 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/WPCC_BY_SA_license.txt
-rw-r--r-- root/root      7816 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/lgpl_3.0.txt
-rw-r--r-- root/root     25864 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/lgpl_2.0.txt
-rw-r--r-- root/root      2232 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/CLALLSERIAL_license.txt
-rw-r--r-- root/root     10439 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/CPOL_1.02.txt
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/lib/
-rw-r--r-- root/root   5339752 2017-12-21 22:48 ./usr/lib/libQt5Core.so.5.7.0
-rw-r--r-- root/root  25047100 2017-12-21 22:48 ./usr/lib/libicudata.so.56.1
-rw-r--r-- root/root   1365560 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so.5.7.0
-rw-r--r-- root/root   1432320 2017-12-21 22:48 ./usr/lib/libQt5Network.so.5.7.0
-rw-r--r-- root/root   5909528 2017-12-21 22:48 ./usr/lib/libQt5Gui.so.5.7.0
-rw-r--r-- root/root    356208 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so.5.7.0
-rw-r--r-- root/root   6614408 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so.5.7.0
-rw-r--r-- root/root   3374854 2017-12-21 22:48 ./usr/lib/libicui18n.so.56.1
-rw-r--r-- root/root   2070162 2017-12-21 22:48 ./usr/lib/libicuuc.so.56.1
-rw-r--r-- root/root    527104 2017-12-21 22:48 ./usr/lib/libQt5DBus.so.5.7.0
drwxr-xr-x root/root         0 2017-12-21 23:31 ./usr/bin/
-rwxr-xr-x root/root    852544 2017-12-21 23:07 ./usr/bin/SpinView_QT
drwxr-xr-x root/root         0 2017-12-20 02:45 ./usr/bin/platforms/
-rw-r--r-- root/root    303544 2017-12-20 02:45 ./usr/bin/platforms/libqlinuxfb.so
-rw-r--r-- root/root     10192 2017-12-20 02:45 ./usr/bin/platforms/libqxcb.so
-rw-r--r-- root/root    141072 2017-12-20 02:45 ./usr/bin/platforms/libqoffscreen.so
-rw-r--r-- root/root    176720 2017-12-20 02:45 ./usr/bin/platforms/libqminimalegl.so
-rw-r--r-- root/root    140592 2017-12-20 02:45 ./usr/bin/platforms/libqminimal.so
-rw-r--r-- root/root      9968 2017-12-20 02:45 ./usr/bin/platforms/libqeglfs.so
-rwxr-xr-x root/root        70 2017-12-20 02:47 ./usr/bin/spinview
lrwxrwxrwx root/root         0 2017-12-21 23:31 ./usr/share/doc/spinview-qt1/LICENSE -> FLIR_license.txt
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Gui.so.5.7 -> libQt5Gui.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so.5.7 -> libQt5XcbQpa.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Network.so.5 -> libQt5Network.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Gui.so -> libQt5Gui.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5XcbQpa.so -> libQt5XcbQpa.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so.5.7 -> libQt5OpenGL.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Network.so -> libQt5Network.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Gui.so.5 -> libQt5Gui.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5DBus.so -> libQt5DBus.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Core.so -> libQt5Core.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so.5 -> libQt5Widgets.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so -> libQt5OpenGL.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libicuuc.so.56 -> libicuuc.so.56.1
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Network.so.5.7 -> libQt5Network.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Core.so.5.7 -> libQt5Core.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libicudata.so.56 -> libicudata.so.56.1
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5DBus.so.5 -> libQt5DBus.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so -> libQt5Widgets.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Widgets.so.5.7 -> libQt5Widgets.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5DBus.so.5.7 -> libQt5DBus.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libicui18n.so.56 -> libicui18n.so.56.1
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.7.0
lrwxrwxrwx root/root         0 2017-12-21 22:48 ./usr/lib/libQt5Core.so.5 -> libQt5Core.so.5.7.0

I think the problem may be that Ubuntu tries to find QT5 in /usr/bin before it looks in /usr/lib/x86_64-linux-gnu. So my question is, how can I achieve Ubuntu using the QT5.5.1 version as default again? Can I configure it or do I have to add the LD_LIBRARY_PATH always now? How can I uninstall the QT5.7 lib? Just delete the files listed above?

解决方案

Qtcreator and rviz don't work because they require qt libs from /usr/lib/x86_64-linux-gnu but links with /usr/lib/libQt* instead (you can double check it using ldd $(which qtcreator) and ldd $(which rviz)). This mess indeed has lot to do with your camera package installation.

I see few ways to address this problem:

1. It looks like your linker prioritize /usr/lib over /usr/lib/x86_64-linux-gnu. Check your LD_LIBRARY_PATH:

echo $LD_LIBRARY_PATH

and if it contains a /usr/lib - try to get rid of it (you must track where you update your LD_LIBRARY_PATH - is it in .bashrc or somewhere else? maybe /etc/ld.so.conf.d?)

2. Set your LD_LIBRARY_PATH in .bashrc to point a valid qt dir. Remember to not override the variable, but rather extend it (put that at the end of ~/.bashrc):

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH

then reload the .bashrc:

. ~/.bashrc

In your experiments, you did an override when launching qtcreator and rviz so only one of these two apps was working depend on what LD_LIBRARY_PATH you set.

Alternatively, you can add /usr/lib/x86_64-linux-gnu/ path in /etc/ld.so.conf.d/ - just create a new .conf file with qt path and reload everything with

sudo ldconfig

Using this method will propably break your camera package because from now on it will link with libs from your new path.

3. Temporary move Qt libraries supplied with camera package (/usr/lib/libQt*) to another location and check if spinview works fine with other version of qt than 5.7. If yes - you are free to delete qt5.7 libs from /usr/lib/ as they are not needed - no sophisticated uninstall process is necessary here. You can always restore it with your camera .deb package anyway.

这篇关于未找到 qtcreator Qt_5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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