首页 技术 正文
技术 2022年11月8日
0 收藏 938 点赞 1,350 浏览 3118 个字

一、更换为国内的软件源

安装搜狗输入法之前请先更换为国内的软件源,否则无法解决依赖问题。首先,用以下命令打开源列表:

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

二、安装sogou输入法

1、首先到搜狗输入法官网下载搜狗输入法,  搜狗输入法Linux版下载地址http://pinyin.sogou.com/linux/?r=pinyin  ,下载的是个deb文件。文件默认下载在当前用户的下载目录下,如下所示:

heyun@heyun-Alienware-15-R3:~/下载$ ls
sogoupinyin_2.2.0.0102_amd64.deb
heyun@heyun-Alienware-15-R3:~/下载$ pwd
/home/heyun/下载

2、进入到下载目录下,接着,在Ubuntu 16.04安装搜狗输入法命令如下:

  sudo apt-get install -f
sudo dpkg -i sogoupinyin_2.0.0.0072_amd64.deb # deb文件名,要和自己下载的版本一致。

3、安装完毕,设置语言选项

到系统设置->语言支持(System->Language Support),将键盘输入法系统由默认的iBus设置为fcitx。如下图:

Ubuntu 16.04安装sogou 拼音输入法

操作此步骤时,如果没有出现fcitx选项,说明你的机器还需要安装fcitx键盘输入法系统,直接看第二部分fcitx的安装。

4、注销,重新登陆。

三、安装fcitx键盘输入法系统

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”,有各种提示就对了。

安装完fcitx后,再安装sogou即可。

——————————————————————–

转载自:http://blog.csdn.net/ljheee/article/details/52966456

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,088
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,564
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,412
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,185
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,822
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,905