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

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

我的QT版本为Qt5.14.1

下面是编译安装的方法。

正确的安装步骤

下载源码fcitx-qt5的源码

git clone https://github.com/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" (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!

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 - Success

CMake Error at CMakeLists.txt:31 (find_package):

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

version 5.1.0) with any of the following names:

Qt5Config.cmake

qt5-config.cmake

Add 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 a

separate 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) (Required

is 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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值