ubuntu16.04(64bit)下的Qt Creater 安装与卸载
安装开源Qt Creater
-
安装:
cd ~/Download sudo chmod +x qt-opensource-linux-x64-5.9.2.run ./qt-opensource-linux-x64-5.9.2.run
组件安装时,不知道的全勾选,其他步骤一直next
请记住安装路径 -
修改配置
sudo gedit /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
# 修改文件第1行和第2行,路径时安装时指定的路径
/home/xxx/Qt5.9.2/5.9.2/gcc_64/bin
/home/xxx/Qt5.9.2/5.9.2
- 安装库
sudo apt-get install libgl1-mesa-dev
Qt Creator中文输入
- 安装库
sudo apt-get install fcitx-libs-qt
sudo apt-get install fcitx-libs-qt5
- 拷贝库
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so /home/xxx/Qt5.9.2/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts/
cd /home/xxx/Qt5.9.2/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts/
chmod +x libfcitxplatforminputcontextplugin.so
卸载Qt Creater
- 进入安装时选择的安装路径。如: cd ~/Qt5.9.2/
- 运行./MaintenanceTool 即可进行引导界面卸载
参考文档:
https://blog.csdn.net/m0_37688984/article/details/80216123
问题记录
- Q: 找不到库
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
A:
-
在~/.bashrc中添加如下内容后, source ~/.bashrc。可查看详细运行结果
export QT_DEBUG_PLUGINS=1 export PATH="/home/xxx/Qt5.9.2/Tools/QtCreator/bin:$PATH" export PATH="/home/xxx/Qt5.9.2/5.9.2/gcc_64/bin:$PATH"
-
运行脚本查看到底因为什么原因。
Cannot load library ..PyQt5/Qt/plugins/platforms/libqxcb.so: (libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)
上述解决办法:
sudo apt-get install libxcb-xinerama0