Linux下离线编译安装fictx-qt

2 篇文章 0 订阅

Linux下离线编译安装fictx-qt

备注:解决Linux下Qt无法使用fcitx输入法问题

1.下载fictx-qt源码

  • https://github.com/fcitx/fcitx-qt5/tree/1.2.7

    我这里选择1.2.7版本

2.解压fictx-qt源码

#解压命令就不写了

3.编译安装

#创建构建目录
mkdir build && cd build
#cmake命令,注意qt目录换为自己环境中的目录
cmake .. -DENABLE_LIBRARY=false  -DQt5_DIR=/opt/Qt5.14.2/lib/cmake/Qt5
#安装
make && make install

**注意:**make install会将生成的libfcitxplatforminputcontextplugin.so拷贝到/opt/Qt5.14.2/5.14.2/gcc_64/plugins/platforminputcontexts/下

错误1:

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/shana/fcitx-qt5/build/CMakeFiles/CMakeOutput.log".

解决方案:

  • 安装extra-cmake-modules

    • #有网络情况下:

      sudo apt install extra-cmake-modules
      
    • #无网络情况下:

      #编译安装extra-cmake-modules,获取其它办法也可。
      #编译安装方法如下:
      #下载源码:https://gitee.com/lihejia/extra-cmake-modules/repository/archive/v5.47.0.zip
      
      mkdir build && cd build
      cmake ..
      make && make install
      

错误2:

Could NOT find XKBCommon XKBCommon 
(missing: XKBCommon XKBCommon LIBRARY XKBCommon XKBCommon INCLUDE OIR (found version "")CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (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.16/Modules/FindPackageHandlestandardArgs.cmake:393 ( FPHSA FAILURE MESSAGE)l cmake/FindXKBCommon.cmake:30 (find_package_handle_standard_args) CMakeLists.txt:50 (find_package)

解决方案:

  • 安装libxkbcommon-dev

    sudo apt-get install libxkbcommon-dev
    
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值