CentOS 7 安裝中文輸入法


參考:http://seisman.info/fcitx-for-centos-7.html#id10

1.加入EPEL源

1 $ wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm
2 $ sudo rpm -ivh epel-release-7-1.noarch.rpm
3 $ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

2.添加mosquito-myrepo源

mosquito-myrepo是一個私人制作的第三方源,其中包含了fcitx輸入法以及基於fcitx的搜狗輸入法。

1 $ yum-config-manager --add-repo=https://copr.fedoraproject.org/coprs/mosquito/myrepo/repo/epel-7/mosquito-myrepo-epel-7.repo

3.安裝搜狗輸入法

1 $ yum install sogou-pinyin sogou-pinyin-skins

4.配置

1 $ sudo pkill ibus-daemon
2 $ gsettings set org.gnome.settings-daemon.plugins.keyboard active false
3 $ imsettings-switch fcitx
4 $ fcitx -r; fcitx-configtool
5 $ sogou-qimpanel

執行后面兩個命令后可能會報一些錯誤,似乎可以不用管。執行完成之后,退出當前用戶並重新登陸。

5.安裝其他輸入法

1 $ yum install fcitx-googlepinyin fcitx-cloudpinyin # 谷歌拼音輸入法
2 $ yum install fcitx-rime fcitx-cloudpinyin # 中州韻輸入法
3 $ yum install fcitx-libpinyin fcitx-cloudpinyin # libpinyin輸入法
4 $ yum install fcitx-sunpinyin sunpinyin-data fcitx-cloudpinyin # sunpinyin輸入法

最后的清理:

mosquito-myrepo在不斷地支持更多的軟件,這也進一步造成該repo中的軟件與base、EPEL中的軟件存在版本沖突,在該repo的項目主頁中建議安裝yum的優先級插件yum-plugin-priorities,這在一定程度上會緩解版本沖突問題,但無法從根本上避免。鑒於多個repo的版本沖突會造成一些麻煩,最好的辦法還是在安裝完需要的軟件之后就禁用該repo,需要的時候再啟用。

編輯/etc/yum.repos.d/mosquito-myrepo-epel-7.repo,將其中的enable=1改成enable=0即可。

參考:https://copr.fedoraproject.org/coprs/mosquito/myrepo/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM