我错误地删除了/ usr / lib / x86_64-linux-gnu中的所有qt5相关文件。所以,我使用
再次安装了qt5sudo apt-get install qt5-default
sudo apt-get install qtdeclarative5-dev
但是,使用qt5的应用程序抱怨缺少某些东西。 例如,
$ qtcreator
qtcreator: error while loading shared libraries: libQt5Test.so.5: cannot open shared object file: No such file or directory
$ qtpaths
/usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.6' not found (required by /usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths)
/usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by /usr/lib/x86_64-linux-gnu/qt5/bin/qtpaths)
$ cmake-gui
This application failed to start because it could not find or load the Qt platform plugin "xcb".
如何正确重新安装qt5并使这些应用程序正常运行?
提前谢谢!
答案 0 :(得分:0)
Xcb支持是Qt X11的一部分。尝试安装“Qt 5 X11 extras”(libqt5x11extras5-dev)。 另一个解决方案很难,但可以从源代码中进行自己的Qt构建。