Qt5链接器错误:未找到版本“Qt_5”

时间:2016-12-03 07:40:22

标签: qt qt5

1问题

我正在尝试在Arch Linux机器上从头开始构建开源motorcar项目。 Motorcar是一款Linux VR窗口管理器,可与Oculus Rift D2K耳机和Razer Hydra控制器配合使用。您不需要这些项目来实际编译此项目。

问题:我无法在我的机器上编译汽车(Arch Linux)。我遇到了Qt5链接错误(如下所述)。

2汽车先决条件&构建目标

正如README所示,为了制造汽车需要以下先决条件:

  1. Mesa,使用EGL和Desktop OpenGL支持编译。
  2. Cairo,使用EGL和Desktop OpenGL支持编译。
  3. QtWayland 5.5(需要Qt5.5)。
  4. Wayland(Linux窗口管理器协议)。
  5. 此外,汽车项目分为以下实际构建目标:

    1. libmotorcar-compositor:这是用于在此之后支持构建目标的实际汽车库。
    2. simple-compositor:这是一个简单的Wayland合成器,您可以从控制台启动它。一旦启动(在屏幕上,而不是在VR耳机中),您可以在其中启动3D窗口程序。
    3. rift-hydra-compositor:这与simple-compositor相同,但它配备了对Oculus Rift D2K耳机和Razer Hydra控制器的支持。
    4. motorcar-client-demo:这是客户端“窗口”,可以在simple-compositorrift-hydra-compositor中运行。它只是一个旋转的立方体。启动simple-compositor后,您应该能够使用alt-tab连接到控制台并运行motorcar-client-demo(这将在正在运行的simple-compositor内启动3D多维数据集。)
    5. 3我是如何尝试制造汽车目标(以及我得到的错误)

      我的系统:使用nvidia显卡构建Linux(运行nvidia驱动程序)。

      首先请注意,汽车项目提供build.sh脚本。我尝试过使用它并不能在我的系统上运行。因此,我从源头编译了所有内容。我是这样做的(导致最终的错误)。

      3.1我如何构建Mesa

      首先我从mesa下载了mesa-13.0.2.tar.gz。从tar中删除后,我跑了:

      $ ./configure --prefix=$WLD --enable-gles2 --disable-gallium-egl --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi --with-gallium-drivers=r300,r600,swrast,nouveau --enable-glx-tls # what should $WLD be here? It might have been left blank.
      $ make
      $ sudo make install
      

      3.2我如何建造开罗

      首先我下载了​​从cairo's website链接的LATEST-cairo-1.14.6。从tar中删除后,我跑了:

      $ ./configure --prefix=$WLD --enable-xcb=yes --enable-gl=yes -enable-egl=yes # what should $WLD be here? It might have been left blank.
      $ make
      $ sudo make install
      

      3.3我如何建造Wayland

      我刚刚使用了我的包管理器。

      $ sudo pacman -S wayland
      $ sudo pacman -S weston # in case this is relevant
      

      3.4我如何建立qtwayland和qt5.5

      在这里,我遵循了汽车自述文件的说明:

      $ cd ~
      $ git clone git://code.qt.io/qt/qt5.git qt5
      $ cd qt5
      $ git checkout 1497a398e34e18abb18f705b2294464840629ca1 # the Qt5 commit hash confirmed to work from the README
      $ ./init-repository --no-webkit  --module-subset=qtbase,qtdeclarative,qtwayland # I removed qtjsbackend from the module-subset since it isn't strictly needed
      
      $ cd qtbase
      $ git checkout 7010da2e6274febf71db40a535ce1d0c4858f143 # the qtbase commit hash confirmed to work from the README
      $ cd ../qtwayland
      $ git checkout 3dc9cfdbd2771c28c770d432b99e571db43fe599 # the qtwayland commit hash confirmed to work from the README
      $ cd ../
      $ ./configure -prefix /opt/qt5  -debug -confirm-license -opensource -egl -opengl -no-xcb-xlib
      
      $ cd qtwayland
      $ git clean -fdx
      $ ../qtbase/bin/qmake CONFIG+=wayland-compositor
      $ cd ../
      $ make -j4 # the -j4 flag speeds up make by a factor of 4; otherwise this build takes a LONG time
      $ make install
      

      3.5我如何构建libmotorcar-compositor

      $ cd ~
      $ git clone https://github.com/evil0sheep/motorcar.git motorcar
      $ /opt/qt5/bin/qmake
      $ make
      

      3.6我如何尝试和失败建立simple-compositor

      $ cd ~/motorcar/src/examples/compositors/simple-compositor
      $ make
      g++  main.cpp  -std=c++11  -I../../../../src/compositor -I../../../../src/protocol -I../../../../src/device -L../../../../lib -lmotorcar-compositor  -o simple-compositor 
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QGuiApplication::primaryScreen()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QSurfaceFormat::setDepthBufferSize(int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWaylandCompositor::QWaylandCompositor(char const*, QFlags<QWaylandCompositor::ExtensionFlag>)'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QTimer::start(int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QMatrix4x4::translate(float, float)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::defaultFramebufferObject() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::resizeEvent(QResizeEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QGuiApplication::exec()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QSurfaceFormat::setStencilBufferSize(int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QSurfaceFormat::~QSurfaceFormat()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `qFlagLocation(char const*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::childEvent(QChildEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QMetaObject::Connection::~Connection()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::staticMetaObject@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::metaObject() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::create()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::focusObject() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::setSurfaceType(QSurface::SurfaceType)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::wheelEvent(QWheelEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::accessibleRoot() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLTextureCache::QOpenGLTextureCache(QOpenGLContext*)@Qt_5_PRIVATE_API'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QSurfaceFormat::QSurfaceFormat(QSurfaceFormat const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::focusOutEvent(QFocusEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `non-virtual thunk to QWindow::format() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLShaderProgram::addShaderFromSourceCode(QFlags<QOpenGLShader::ShaderTypeBit>, char const*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QPixmap::fromImage(QImage const&, QFlags<Qt::ImageConversionFlag>)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLTexture::QOpenGLTexture(QImage const&, QOpenGLTexture::MipMapGeneration)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::qt_metacast(char const*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QScreen::geometry() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::~QObject()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLShaderProgram::QOpenGLShaderProgram(QObject*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::tabletEvent(QTabletEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::timerEvent(QTimerEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::showEvent(QShowEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::nativeEvent(QByteArray const&, void*, long*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::setGeometry(QRect const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QMatrix4x4::scale(float, float)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QSurfaceFormat::setSwapInterval(int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::installEventFilter(QObject*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLShaderProgram::release()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWaylandCompositor::createOutput(QWindow*, QString const&, QString const&)'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QListData::dispose(QListData::Data*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::QOpenGLContext(QObject*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::create()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QImage::height() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QTimer::~QTimer()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QDateTime::currentMSecsSinceEpoch()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::eventFilter(QObject*, QEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QCoreApplication::self@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QGuiApplication::screens()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::hideEvent(QHideEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::disconnectNotify(QMetaMethod const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QCursor::~QCursor()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QCursor::QCursor(QPixmap const&, int, int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLTexture::textureId() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QImage::~QImage()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::qt_metacall(QMetaObject::Call, int, void**)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::functions() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObjectData::dynamicMetaObject() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::setFormat(QSurfaceFormat const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWaylandCompositor::openUrl(QWaylandClient*, QUrl const&)'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QScreen::refreshRate() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::keyPressEvent(QKeyEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QGuiApplication::changeOverrideCursor(QCursor const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::qt_metacast(char const*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLShaderProgram::setUniformValue(int, QMatrix4x4 const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::mouseReleaseEvent(QMouseEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QImage::QImage()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::mouseDoubleClickEvent(QMouseEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::event(QEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::isExposed() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QImage::convertToFormat_helper(QImage::Format, QFlags<Qt::ImageConversionFlag>) const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::surfaceHandle() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::qt_metacall(QMetaObject::Call, int, void**)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QListData::detach(int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::moveEvent(QMoveEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::sender() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `typeinfo for QWindow@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::mousePressEvent(QMouseEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QString::fromAscii_helper(char const*, int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::event(QEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::QWindow(QScreen*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLTexture::~QOpenGLTexture()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `non-virtual thunk to QWindow::surfaceType() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QPixmap::~QPixmap()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLShaderProgram::bind()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QImage::width() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QGuiApplication::queryKeyboardModifiers()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::mouseMoveEvent(QMouseEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::keyReleaseEvent(QKeyEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `non-virtual thunk to QWindow::surfaceHandle() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QMetaObject::cast(QObject*) const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::makeCurrent(QSurface*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::exposeEvent(QExposeEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::~QWindow()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLShaderProgram::attributeLocation(char const*) const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QImage::constBits() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QGuiApplication::setOverrideCursor(QCursor const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::format() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `qt_assert(char const*, char const*, int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLShaderProgram::uniformLocation(char const*) const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::showFullScreen()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::currentContext()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QSurfaceFormat::QSurfaceFormat()@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::surfaceType() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QTimer::QTimer(QObject*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::focusInEvent(QFocusEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::geometry() const@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QWindow::setFormat(QSurfaceFormat const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::connectNotify(QMetaMethod const&)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QOpenGLContext::swapBuffers(QSurface*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::customEvent(QEvent*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QGuiApplication::QGuiApplication(int&, char**, int)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `QObject::QObject(QObject*)@Qt_5'
      ../../../../lib/libmotorcar-compositor.so: undefined reference to `typeinfo for QObject@Qt_5'
      collect2: error: ld returned 1 exit status
      make: *** [Makefile:14: compositor] Error 1
      

      3.7我如何找到与libmotorcar-compositor.so

      相关的Qt5链接错误

      以上输出使我发现存在与libmotorcar-compositor库相关的内部链接错误,如下所示(请注意错误的前三行):

      $ cd ~/motorcar/lib
      $ ls
      libmotorcar-compositor.so  libmotorcar-compositor.so.1  libmotorcar-compositor.so.1.0  libmotorcar-compositor.so.1.0.0
      $ ldd libmotorcar-compositor.so
      ./libmotorcar-compositor.so: /opt/qt5/lib/libQt5Core.so.5: version `Qt_5' not found (required by ./libmotorcar-compositor.so)
      ./libmotorcar-compositor.so: /opt/qt5/lib/libQt5Gui.so.5: version `Qt_5_PRIVATE_API' not found (required by ./libmotorcar-compositor.so)
      ./libmotorcar-compositor.so: /opt/qt5/lib/libQt5Gui.so.5: version `Qt_5' not found (required by ./libmotorcar-compositor.so)
          linux-vdso.so.1 (0x00007ffcb60c9000)
          libQt5Widgets.so.5 => /opt/qt5/lib/libQt5Widgets.so.5 (0x00007f6084efa000)
          libQt5Compositor.so.5 => /opt/qt5/lib/libQt5Compositor.so.5 (0x00007f6084e1a000)
          libQt5Quick.so.5 => /opt/qt5/lib/libQt5Quick.so.5 (0x00007f60848f2000)
          libQt5Qml.so.5 => /opt/qt5/lib/libQt5Qml.so.5 (0x00007f60842dc000)
          libQt5Network.so.5 => /opt/qt5/lib/libQt5Network.so.5 (0x00007f6084133000)
          libQt5Gui.so.5 => /opt/qt5/lib/libQt5Gui.so.5 (0x00007f6083a84000)
          libQt5Core.so.5 => /opt/qt5/lib/libQt5Core.so.5 (0x00007f60834c6000)
          libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f608322a000)
          libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f608300d000)
          libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6082c85000)
          libm.so.6 => /usr/lib/libm.so.6 (0x00007f6082981000)
          libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f608276a000)
          libc.so.6 => /usr/lib/libc.so.6 (0x00007f60823ca000)
          libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f6082178000)
          libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f6081e65000)
          libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f6081c53000)
          libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f6081914000)
          libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0x00007f6081701000)
          libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f60814bf000)
          librt.so.1 => /usr/lib/librt.so.1 (0x00007f60812b7000)
          libz.so.1 => /usr/lib/libz.so.1 (0x00007f60810a1000)
          libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f6080e6b000)
          libicui18n.so.57 => /usr/lib/libicui18n.so.57 (0x00007f60809f1000)
          libicuuc.so.57 => /usr/lib/libicuuc.so.57 (0x00007f6080647000)
          libicudata.so.57 => /usr/lib/libicudata.so.57 (0x00007f607ebcb000)
          libpcre16.so.0 => /usr/lib/libpcre16.so.0 (0x00007f607e962000)
          libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f607e75e000)
          libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f607e55c000)
          /usr/lib64/ld-linux-x86-64.so.2 (0x00005591851f1000)
          libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f607e332000)
          libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f607e12d000)
          libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x00007f607df2a000)
          libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f607dd23000)
          libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007f607db20000)
          libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007f607d8f1000)
          libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f607d6ee000)
          libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f607d4e6000)
          libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f607d2e4000)
          libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f607d0bb000)
          libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0x00007f607ce9f000)
          libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0x00007f607cc9a000)
          libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f607ca94000)
          libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f607c882000)
          libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f607c679000)
          libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f607c406000)
          libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f607c202000)
          libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f607bffc000)
      

1 个答案:

答案 0 :(得分:1)

尝试将Qt的bin目录添加到PATHlib目录到LD_LIBRARY_PATH

export PATH=/opt/qt5/bin:$PATH
export LD_LIBRARY_PATH=/opt/qt5/lib:$LD_LIBRARY_PATH

我相信您可能已将shared-object.so库明确地与/opt/qt5/lib/libQt5Core.so相关联,但由于它依赖于其他Qt库而无法找到它们,因此您有错误。上述调整可能会解决问题。

另见: