admin 管理员组

文章数量: 1184232

1.更新 yum

yum update

2.卸载 ibus

rpm -e --nodeps ibus

3.安装 epel 源

yum -y install epel-release

4.安装 fcitx 环境、qtwebkit包 和 alien 转换工具等(可以将 .deb 文件转为 .rpm 文件)

yum install -y qtwebkit
yum install -y fcitx*
yum install -y alien
yum install  -y redhat-lsb    # fcitx-configtools 要依赖此包中的内容

5.下载 2.2.0版本 的 linux 搜狗输入法

wget http://cdn2.ime.sogou/dl/index/1524572264/sogoupinyin_2.2.0.0108_amd64.deb

6.使用 alien 强制转换 deb 文件 至 rpm 文件

alien -r --scripts sogoupinyin_2.2.0.0108_amd64.deb

7.强制安装 转换后的搜狗输入法安装文件

rpm -ivh --force sogoupinyin-2.2.0.0108-2.x86_64.rpm

8.将搜狗输入法词语库转移至 fcitx

cp /usr/lib/x86_64-linux-gnu/fcitx/fcitx-sogoupinyin.so /usr/lib64/fcitx/

9.为新目录授权

chown -R 776 /usr/share/fcitx-sogoupinyin/

10.检查 QT 依赖及 fcitx-configtool、fcitx-pinyin

yum -y install fcitx-qt5 fcitx-configtool
yum -y install fcitx-pinyin

11.修改环境变量

vim /etc/profile 

在文件末尾添加内容

export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"


13.重新打开终端,并运行

fcitx -r
fcitx-configtool

14.添加 pinyin
注意!是 pinyin 而不是 SogouPinYin!否则会报错!


如果不能显示出任何输入法,则直接重启,再重复 13.

14.重新启动

reboot

15.若无法正常使用
请多次尝试 重复 13~14 步骤,并重新检查依赖项是否已经 OK

本文标签: 搜狗 输入法