rviz qtCore missing in melodic

asked 2019-03-01 03:10:04 -0600

Markus gravatar image

updated 2019-03-01 06:19:05 -0600

Hey there,

I just installed the melodic desktop version on my ubuntu 18.04 machine. If I try to roscore, rosrun rviz rviz I get the following error:

/opt/ros/melodic/lib/rviz/rviz: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directoryde here

If I then do:

ldd /opt/ros/melodic/lib/librviz.so | grep Qt

I get:

libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007f9093ff4000)
libQt5Gui.so.5 => not found
libQt5Core.so.5 => not found
libQt5Gui.so.5 => not found
libQt5Core.so.5 => not found

Does anyone know how to solve this error?

PS: rqt_image_view also does not run:

 rosrun rqt_image_view rqt_image_view
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/rqt_image_view/rqt_image_view", line 16, in <module>
    plugin_argument_provider=add_arguments))
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/main.py", line 59, in main
    return super(Main, self).main(argv, standalone=standalone, plugin_argument_provider=plugin_argument_provider, plugin_manager_settings_prefix=str(hash(os.environ['ROS_PACKAGE_PATH'])))
  File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/main.py", line 338, in main
    from python_qt_binding import QT_BINDING
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/__init__.py", line 55, in <module>
    from .binding_helper import loadUi, QT_BINDING, QT_BINDING_MODULES, QT_BINDING_VERSION  # @UnusedImport
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 271, in <module>
    getattr(sys, 'SELECT_QT_BINDING_ORDER', None),
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 117, in _select_qt_binding
    raise ImportError("Could not find Qt binding (looked for: %s):\n%s" % (', '.join(["'%s'" % b for b in binding_order]), '\n'.join(error_msgs)))
ImportError: Could not find Qt binding (looked for: 'pyqt', 'pyside'):
  ImportError for 'pyqt': libQt5Core.so.5: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 108, in _select_qt_binding
    QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 150, in _load_pyqt
    _named_import('PyQt5.%s' % module_name)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 130, in _named_import
    module = builtins.__import__(name)
ImportError: libQt5Core.so.5: cannot open shared object file: No such file or directory

  ImportError for 'pyside': No module named PySide2.QtCore
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 108, in _select_qt_binding
    QT_BINDING_VERSION = binding_loader(required_modules, optional_modules)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 182, in _load_pyside
    _named_import('PySide2.%s' % module_name)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/python_qt_binding/binding_helper.py", line 130, in _named_import
    module = builtins.__import__(name)
ImportError: No module named PySide2.QtCore

dpkg -l | grep qt5

ii  libqt5concurrent5:amd64                    5.9.5+dfsg-0ubuntu1                          amd64        Qt 5 concurrent module
ii  libqt5core5a:amd64                         5.9.5+dfsg-0ubuntu1                          amd64        Qt 5 core module
ii  libqt5dbus5:amd64                          5.9.5+dfsg-0ubuntu1                          amd64        Qt 5 D-Bus module
ii  libqt5designer5:amd64                      5.9.5-0ubuntu1                               amd64        Qt 5 designer module
ii  libqt5gui5:amd64                           5.9.5+dfsg-0ubuntu1                          amd64        Qt ...
(more)
edit retag flag offensive close merge delete

Comments

What's the output of dpkg | grep qt5?

gvdhoorn gravatar imagegvdhoorn ( 2019-03-01 04:53:22 -0600 )edit

posted output see above.... I guess it is a linking problem? But How do I solve it?

Markus gravatar imageMarkus ( 2019-03-01 05:33:34 -0600 )edit

Well .. I would first think of a library search path issue. rviz is certainly linked to libQt5Gui.so.5, otherwise it wouldn't show up in the output of ldd. dpkg -S libQt5Gui.so.5 also returns libqt5gui5 for you?

gvdhoorn gravatar imagegvdhoorn ( 2019-03-01 05:38:51 -0600 )edit

Yes (see result above).

Markus gravatar imageMarkus ( 2019-03-01 06:00:32 -0600 )edit