这一步,如果你的系统有ficit的话,这步就省略掉吧!!!
sogou是基于fcitx的,而系统默认的键盘输入法系统是iBus。Ubuntu 16.04默认是带有fcitx的,正常安装,如果有的话,按上面步骤即可完成;但有些版本的Ubuntu,需要自己安装 fcitx,才能安装使用sogou。
1、添加以下源
sudo add-apt-repository ppa:fcitx-team/nightly
2、更新系统:sudo apt-get update,如果报错了就按照下面注意的那个一样尝试修改。
3、安装fcitx:sudo apt-get install fcitx
4、安装fcitx的配置工具:sudo apt-get install fcitx-config-gtk
5、安装fcitx的table-all软件包:sudo apt-get install fcitx-table-all
6、安装im-switch切换工具:sudo apt-get install im-switch
至此,fcitx键盘输入法系统就安装好了。第5,6步需要按键“Y”确认安装。简单测试的方法就是在终端键入“fcitx”,有各种提示就对了。
安装完Ubuntu 16.04(LTS---长期稳定版)后,要更换为国内的软件源:
sudo gedit /etc/apt/sources.list #用文本编辑器打开源列表
在这个文件之前添加以下的源:
deb http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
或者清华的源:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
接下来就是更新源了 :sudo apt-get update
注意:博主在这里遇到了问题:会报错(failed to fatch http://ppa....,some index files failed to download等等),尝试了很多的方法,终于找到解决方法。这时候博主打开了系统设置-》软件和更新,将相应的报错的源前面的对号去掉了。再次进行更新操作就不会报错了。
一 、首先到搜狗输入法官网下载搜狗输入法,下载的是个deb文件。
搜狗输入法Linux版下载地址:http://pinyin.sogou.com/linux/?r=pinyin
- sudo apt-get install -f
- sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb 这里需要你输入你的开机登陆密码,不出意外,这步会报错,不要慌,跟着我做以下的步骤。
- 依然在终端里,通过下面这条命令修复缺失的组件,需要联网: sudo apt-get -f install
等待片刻,直到程序下载完成,这样继续执行第一步的:sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb这样就成功了。 - 还需要修改系统默认输入法,点击桌面右上角的开关按钮,系统设置(System Config)->语言支持(Language Support)-> 键盘输入法系统从ibus改成fcitx(fcitx是支持搜狗输入法的中国人自制的输入法系统)
- 在上一步结束后,我们可以找到“添加或删除语言…”打开后找到Chinese(Simple)(简体中文是也),打钩。再应用到整个系统(这步可要可不要)。
- 桌面右上角,找到并点击注销(log out)
- 重新输入密码登陆后右上角有个小企鹅标志,点击他就能切换成搜狗输入法了。当然也能使用快捷键Ctrl+shift切换。
至此输入法就算是安装完成了,祝大家好运。