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

总览

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

一、安装依赖

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

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

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

在文件末尾添加内容

powershell 复制代码
export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
13.在非 root 用户下开启 fcitx、fcitx-configtools

重新打开终端,并运行

powershell 复制代码
fcitx -r
fcitx-configtool
14.添加 pinyin

注意!是 pinyin 而不是 SogouPinYin!否则会报错!

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

15.重新启动
powershell 复制代码
reboot

16.若无法正常使用

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

相关推荐
2301_777998345 小时前
Linux信号机制
linux
一叶龙洲7 小时前
win11与Ubuntu之间同步配置、插件
linux·运维·ubuntu
CHANG_THE_WORLD8 小时前
12.总结:深入理解 Linux I/O 多路复用:select、poll、epoll 全解析
linux·运维·服务器
风曦Kisaki8 小时前
# Linux笔记:操作系统优化与资源管理
linux·运维·服务器·笔记
Mr.HeBoYan9 小时前
一次持续三天才出现的丢包故障——深入解析 DPDK Memory Ordering、rte_ring 与 CPU Memory Barrier (下)
linux·网络·算法·架构·dpdk
zhangrelay10 小时前
笔记本轻量高品质延寿工具完整分系统清单
运维·笔记·学习
Discipline~Hai11 小时前
ARM01-ARM体系架构
linux·c语言·arm开发·架构
RisunJan12 小时前
Linux命令-screen(终端复用器)
linux·运维
啊哦11112 小时前
安装VMware Workstation
linux·运维·服务器
持敬chijing12 小时前
Linux基础命令与目录命令
linux·运维·服务器