第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > deepin linux下解决Qt搜狗输入法无法输入中文

deepin linux下解决Qt搜狗输入法无法输入中文

时间:2018-08-31 08:20:30

相关推荐

deepin linux下解决Qt搜狗输入法无法输入中文

网上很多方法都是把系统库下的libfcitxplatforminputcontextplugin.so复制到qt的目录下,但我的没效果。

我的QT版本为Qt5.14.1

下面是编译安装的方法。

正确的安装步骤

下载源码fcitx-qt5的源码

git clone /fcitx/fcitx-qt5安装依赖

sudo apt install cmake fcitx-libs-dev extra-cmake-modules libxkbcommon-dev将qt的工具链加入PATH变量(这一步的目录大家可能不一样)

export PATH=$PATH:/home/leon/Qt5.14.1/5.14.1/gcc_64/bin开始编译

cd fcitx-qt5

cmake .

make

sudo make install复制

cp /home/leon/Qt5.14.1/5.14.1/gcc_64/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so /home/leon/Qt5.14.1/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so

遇到错误解决(下面是踩坑步骤)

cmake错误1 – ECMConfig.cmake

CMake Error at CMakeLists.txt:8 (find_package):Could not find a package configuration file provided by "ECM" (requestedversion 1.4.0) with any of the following names:ECMConfig.cmakeecm-config.cmakeAdd 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 aseparate development package or SDK, be sure it has been installed.-- Configuring incomplete, errors occurred!See also "/home/leon/Downloads/sougou_qt/fcitx-qt5/build/CMakeFiles/CMakeOutput.log".

解决办法,装软件

sudo apt install extra-cmake-modules

错误2 – Qt5Config.cmake

-- Performing Test SUPPORT_CXX11-- Performing Test SUPPORT_CXX11 - SuccessCMake Error at CMakeLists.txt:31 (find_package):Could not find a package configuration file provided by "Qt5" (requestedversion 5.1.0) with any of the following names:Qt5Config.cmakeqt5-config.cmakeAdd the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"to a directory containing one of the above files. If "Qt5" provides aseparate development package or SDK, be sure it has been installed.-- Configuring incomplete, errors occurred!See also "/home/leon/Downloads/sougou_qt/fcitx-qt5/build/CMakeFiles/CMakeOutput.log".

解决办法:没有配置qt工具的环境变量

export PATH=$PATH:/home/leon/Qt5.14.1/5.14.1/gcc_64/bin

错误3–XKBCommon

-- Could NOT find XKBCommon_XKBCommon (missing: XKBCommon_XKBCommon_LIBRARY XKBCommon_XKBCommon_INCLUDE_DIR) CMake Error at /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):Could NOT find XKBCommon (missing: XKBCommon_LIBRARIES XKBCommon) (Requiredis at least version "0.5.0")Call Stack (most recent call first):/usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)cmake/FindXKBCommon.cmake:30 (find_package_handle_standard_args)CMakeLists.txt:33 (find_package)

解决办法,装库

sudo apt-get install libxkbcommon-dev

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。