ubuntu16.04(64bit)下的Qt Creater 安裝與卸載

ubuntu16.04(64bit)下的Qt Creater 安裝與卸載

安裝開源Qt Creater

  1. 下載5.9.2版本Qt Creater

  2. 安裝:

    cd ~/Download
    sudo chmod +x qt-opensource-linux-x64-5.9.2.run
    ./qt-opensource-linux-x64-5.9.2.run
    

    組件安裝時,不知道的全勾選,其他步驟一直next
    請記住安裝路徑

  3. 修改配置

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
  1. 安裝庫
sudo apt-get install libgl1-mesa-dev

Qt Creator中文輸入

  1. 安裝庫
sudo apt-get install fcitx-libs-qt 
sudo apt-get install fcitx-libs-qt5
  1. 拷貝庫
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

  1. 進入安裝時選擇的安裝路徑。如: cd ~/Qt5.9.2/
  2. 運行./MaintenanceTool 即可進行引導界面卸載

參考文檔:
https://blog.csdn.net/m0_37688984/article/details/80216123

問題記錄

  1. 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
    
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章