日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

解决Qt5 Creator无法切换输入法(fcitx),Ubuntu中不能使用搜狗输入法录入汉字问题...

發布時間:2023/12/9 Ubuntu 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决Qt5 Creator无法切换输入法(fcitx),Ubuntu中不能使用搜狗输入法录入汉字问题... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2016年6月8日修正,ubuntu 16.04 Qt5.7.0 以及 Qt5.6.1均測試通過

在Qt5.3之前,我發布過解決辦法 解決Qt5 Creator無法切換輸入法(fcitx),不能錄入漢字問題,Qt5.4以及Qt5.5,舊辦法失效,原因是Qt5.4后對之前Qt5版本不再二進制兼容,libfcitxplatforminputcontextplugin.so 需要編譯最新的fcitx-qt5。

看fcitx-qt5項目的更新日志,是在1.0.3版本時解決的這個問題,寫本篇博客時,我git clone到的是1.0.4版本。

編譯fcitx-qt需要cmake,安裝cmake命令,如果已經安裝,請略過。

sudo apt-get install cmake

安裝 fcitx-libs-dev

sudo apt-get install fcitx-libs-dev

設置qmake的環境變量:

export PATH="/home/lieefu/Qt5.6.1/5.6/gcc_64/bin":$PATH

下載fcitx-libs源碼:

git clone git@github.com:fcitx/fcitx-qt5.git

編譯方法:

cd fcitx-qt5 cmake . make sudo make install

最后把編譯得到 libfcitxplatforminputcontextplugin.so 拷貝到 Qt5.5安裝目錄的 Tools/QtCreator/bin/plugins/platforminputcontexts

Qt5.6的目錄是 Tools/QtCreator/lib/Qt/plugins/platforminputcontexts

大功告成!

??? CMake Error at CMakeLists.txt:8 (find_package):

????? Could not find a package configuration file provided by "ECM" (requested

????? version 1.4.0) with any of the following names:

??????? ECMConfig.cmake

??????? ecm-config.cmake

????? Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"

????? to a directory containing one of the above files.? If "ECM" provides a

????? separate development package or SDK, be sure it has been installed.

??? -- Configuring incomplete, errors occurred!

?

遇到上述錯誤處里方法:

這個頁面 https://launchpad.net/ubuntu/+source/extra-cmake-modules/1.4.0-0ubuntu1 下載 extra-cmake-modules_1.4.0.orig.tar.xz

?https://launchpad.net/ubuntu/+source/extra-cmake-modules/5.18.0-0ubuntu1? extra-cmake-modules_5.18.0.orig.tar.xz

?

解壓后:

cd extra-cmake-modules-1.4.0 cmake . make sudo make install

?

??? CMake Error at /home/lieefu/Qt5.5.0/5.5/gcc_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):

????? Failed to find "GL/gl.h" in "/usr/include/libdrm".

?

處理方法:

sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

?

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")

??? -- Could NOT find XKBCommon_XKBCommon (missing:? XKBCommon_XKBCommon_LIBRARY XKBCommon_XKBCommon_INCLUDE_DIR)

??? CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):

????? Could NOT find XKBCommon (missing: XKBCommon_LIBRARIES XKBCommon) (Required

????? is at least version "0.5.0")

?

處理方法:

Ubuntu 16.04中可以執行 sudo apt install libxkbcommon-dev 安裝

wget http://xkbcommon.org/download/libxkbcommon-0.5.0.tar.xz tar xf libxkbcommon-0.5.0.tar.xz ./configure —prefix=/usr —libdir=/usr/lib/x86_64-linux-gnu —disable-x11 make sudo make install

編譯libxkbcommon用到yacc,如果沒有這個命令,會遇到下面的錯誤,yacc在 bison軟件包中

sudo apt-get install bison

????

  YACC???? src/xkbcomp/parser.c

??? ./build-aux/ylwrap: line 176: yacc: command not found

??? make: *** [src/xkbcomp/parser.c] Error 127

?

本文轉載自:https://my.oschina.net/lieefu/blog/505363

版權歸作者所有

?

轉載于:https://www.cnblogs.com/wpjamer/articles/6493408.html

總結

以上是生活随笔為你收集整理的解决Qt5 Creator无法切换输入法(fcitx),Ubuntu中不能使用搜狗输入法录入汉字问题...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。