当前位置:   article > 正文

【CentOS 7.9】安装搜狗输入法教程_rhel7.9 安装 搜狗

rhel7.9 安装 搜狗

总览

1.如何在 centos7.x 中使用 搜狗输入法

一、安装依赖

1.切换至 root 用户
su root
  • 1
2.更新 yum
yum update
  • 1
3.卸载 ibus
rpm -e --nodeps ibus
  • 1
4.安装 epel 源
yum -y install epel-release
  • 1
5.安装 fcitx 环境、qtwebkit包 和 alien 转换工具等(可以将 .deb 文件转为 .rpm 文件)
yum install -y qtwebkit
yum install -y fcitx*
yum install -y alien
yum install  -y redhat-lsb    # fcitx-configtools 要依赖此包中的内容
  • 1
  • 2
  • 3
  • 4
6.下载 2.2.0版本 的 linux 搜狗输入法

cd 至 downloads 目录,或者其他的目录,将这个 .deb 文件下载至此目录

wget http://cdn2.ime.sogou.com/dl/index/1524572264/sogoupinyin_2.2.0.0108_amd64.deb
  • 1
7.使用 alien 强制转换 deb 文件 至 rpm 文件
alien -r --scripts sogoupinyin_2.2.0.0108_amd64.deb
  • 1
8.强制安装 转换后的搜狗输入法安装文件
rpm -ivh --force sogoupinyin-2.2.0.0108-2.x86_64.rpm
  • 1
9.将搜狗输入法词语库转移至 fcitx
cp /usr/lib/x86_64-linux-gnu/fcitx/fcitx-sogoupinyin.so /usr/lib64/fcitx/
  • 1
10.为新目录授权
chown -R 776 /usr/share/fcitx-sogoupinyin/
  • 1
11.检查 QT 依赖及 fcitx-configtool、fcitx-pinyin
yum -y install fcitx-qt5 fcitx-configtool
yum -y install fcitx-pinyin
  • 1
  • 2
12.修改环境变量
vim /etc/profile 
  • 1

在文件末尾添加内容

export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
  • 1
  • 2
  • 3
  • 4
13.在非 root 用户下开启 fcitx、fcitx-configtools

重新打开终端,并运行

fcitx -r
fcitx-configtool
  • 1
  • 2
14.添加 pinyin

注意!是 pinyin 而不是 SogouPinYin!否则会报错!
如果不能显示出任何输入法,则直接重启,再重复 13.

在这里插入图片描述

15.重新启动
reboot
  • 1

16.若无法正常使用

请多次尝试 重复 13~14 步骤,并重新检查依赖项是否已经 OK

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/176970
推荐阅读
相关标签
  

闽ICP备14008679号