安装完Ubuntu 16.04后,要更换为国内的软件源:

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

更新软件源:sudo apt-get update

更多软件源请自行百度,阿里云的软件源是Ubuntu官方推荐的国内软件源。,清华的软件源也可以。

Ubuntu 的键盘输入法系统包含iBus、fcitx等多种,因为sogou是基于fcitx的,而系统默认的是iBus,所以安装使用不同的输入法,相关的键盘输入法系统也要设置改变。

也可以打开System Settings系统设置里面的 Software & Updates

一、安装sogou输入法步骤:

1、首先到搜狗输入法官网下载搜狗输入法,下载的是个deb文件。

搜狗输入法Linux版下载地址http://pinyin.sogou.com/linux/?r=pinyin

2、Ubuntu 16.04安装搜狗输入法命令如下:

      sudo apt-get install -f

      sudo dpkg -i sogoupinyin_2.2.0.0108_amd64.deb

deb文件名,要和自己下载的版本一致。

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

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

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

4、注销,重新登陆。

将键盘输入法系统改为fcitx后,一定要注销,而且操作顺序不能改。这时还不能马上使用,还要点击右上角的输入法图标,点击设置,进入设置界面,这个时候没有看到搜狗输入法,点击左下角的加号,然后注意先要去掉”只显示当前语言的输入法”前面那个勾,然后再搜索”sogo”,这个时候就看到sogo pinyin了,接着添加就可以了,然后就可以切换输入法了。

注意: 安装搜狗输入法之前请先更换为国内的软件源,否则无法解决依赖问题。

二、安装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即可。


ubuntu彻底卸载搜狗拼音输入法

 

ubuntu彻底卸载搜狗拼音输入法,ubuntu安装搜狗输入法后如果觉得搜狗不是很适合自己,那应该怎么样彻底的卸载搜狗输入法呢?下面我们就来一步步彻底卸载掉搜狗输入法...

方法/步骤

  1. 1

    找到安装的搜狗输入法

    $sudo dpkg  -l  so*  就可以找到sogoupinyin

  2. 2

    卸载搜狗拼音输入法

    $sudo dpkg  -r    sogoupinyin

  3. 3

    桌面右上角  开关机按钮  进入  系统设置

  4. 4

    重新设置ibus为系统默认输入方式

    点击  语言支持      键盘输入方式系统  选择IBus

  5. 5

    卸载fcitx

    $sudo apt-get purge  fcitx

  6. 6

    彻底卸载fcitx及相关配置

    $sudo apt-get autoremove

  7. 7

    注销系统用户

    不知道为什么,卸载搜狗后我这边的注销按钮不能使用了,只好通过命令注销

    $sudo pkill Xorg

  8. 8

    再次登陆进入系统,看看是不是已经回到了原来的熟悉的输入方式呢?

     
     

    遇到的问题

    1. 修复sogou输入法

      好消息~ Ubuntu Kylin团队与搜狗公司合作开发了“搜狗输入法 for Linux”版本,支持Ubuntu 12.04 和 Ubuntu 14.04,在搜狗官网就可以下载到,附上地址:http://pinyin.sogou.com/linux/

      以前在windows一直用搜狗输入法,所以Ubuntu的内置输入法用得不太习惯,现在终于有顺手的输入法了,开心~

      但是经过一段时间的试用,遇到了输入法面板问题,ctrl+space 调出输入法就会弹出一个对话框提示要重启输入法面板,于是多方搜寻,终于找到解决方案,其实用一条命令就可以修复,方法如下:

      1、ctrl+alt+T 打开终端

      2、输入 sogou-qimpanel &

      3、回车即可,可以看到终端里自动执行了一大段命令

      现在再按ctrl+space看看,可爱的搜狗输入法是不是又回来啦?

    2.  问题表现

    sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb
       错误信息如下:
    sogoupinyin : Depends: libopencc2 but it is not installable or
    libopencc1 but it is not going to be installed
    Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed
    Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed
    Recommends: fonts-droid-fallback but it is not going to be installed or
    fonts-droid but it is not installable
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

    一看就知道是依赖包存在问题
    3.  问题分析

    之前在Ubuntu 15.10的版本之时,使用同样的sogou版本,不存在此类的问题。 但是在Ubuntu 16.04中,却存在此类问题,说明Ubuntu升级之后,sogou输入法并未做相应的系统兼容性测试, 故起最高的Ubuntu支持版本时15.10.

    虽然我们知道了问题,但是该如何解决呢?

    基于错误信息,我们发现起依赖包有以下几个: libopencc1 libopencc2,  fcitx-libs, fcitx-libs-qt  font-droid-fallback.

    4.  试错分析

    试错1:

    bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs
    Reading package lists... Done
    Building dependency tree 
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    sogoupinyin : Depends: libopencc2 but it is not installable or
    libopencc1 but it is not going to be installed
    Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed
    Recommends: fonts-droid-fallback but it is not going to be installed or
    fonts-droid but it is not installable
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
       试错2:    
    bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qt
    Reading package lists... Done
    Building dependency tree 
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    sogoupinyin : Depends: libopencc2 but it is not installable or
    libopencc1 but it is not going to be installed
    Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed
    Recommends: fonts-droid-fallback but it is not going to be installed or
    fonts-droid but it is not installable
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
       试错3:
    bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qt fcitx-libs
    Reading package lists... Done
    Building dependency tree 
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    sogoupinyin : Depends: libopencc2 but it is not installable or
    libopencc1 but it is not going to be installed
    Recommends: fonts-droid-fallback but it is not going to be installed or
    fonts-droid but it is not installable
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
      试错4:
    bladestone@bladestone-laptop:~$ sudo apt install fonts-droid-fallback
    Reading package lists... Done
    Building dependency tree 
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    sogoupinyin : Depends: libopencc2 but it is not installable or
    libopencc1 but it is not going to be installed
    Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed
    Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
      试错5:
    bladestone@bladestone-laptop:~$ sudo apt install libopencc1
    Reading package lists... Done
    Building dependency tree 
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    sogoupinyin : Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed
    Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed
    Recommends: fonts-droid-fallback but it is not going to be installed or
    fonts-droid but it is not installable
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
     分析: 经过各种尝试,发现依然无法正常解决问题,类库包之间的依赖关系还是非常复杂的。
    5. 问题解决

    5.1 移除sogou输入法, 由于其安装不完整

    sudo apt remove sogoupinyin
      执行过程:
    Reading package lists... Done
    Building dependency tree 
    Reading state information... Done
    The following packages will be REMOVED:
    sogoupinyin
    0 upgraded, 0 newly installed, 1 to remove and 43 not upgraded.
    1 not fully installed or removed.
    After this operation, 42.6 MB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 214444 files and directories currently installed.)
    Removing sogoupinyin (2.0.0.0078) ...
    Processing triggers for libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) ...
    Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
    Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
    Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160523-0ubuntu1) ...
    Rebuilding /usr/share/applications/bamf-2.index...
    Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
    Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
    Processing triggers for mime-support (3.59ubuntu1) ...
      5.2 正确的包安装姿势
    sudo apt install libopencc1 fcitx-libs fcitx-libs-qt fonts-droid-fallback
      5.3 重新安装sogou输入法
    sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb
      结果 一切顺利,没有报类似的错误信息
    6. 总结

    安装依赖需要一次安装完成,切勿单个安装,主要是由于包之间彼此会有一定的依赖关系,这个是你无法准确定位的,故在 一次安装动作中做完。

    另外, sogou输入法的Linux版本目前只兼容到Ubunut 15.10, 请大家彼此周知该情况。

     
     
     

Ubuntu更改源和搜狗输入法安装卸载的更多相关文章

  1. Ubuntu postgres 内网 安装 卸载

    # 安装pg,(使用安装包, 不能连接外网) tar包下载地址 https://www.postgresql.org/ftp/source/v11.1/放在/home/sxy 目录(随便放)cd /h ...

  2. ubuntu lamnp 环境的安装/卸载 及 配置

    安装mysql--------------------------------------sudo apt install mysql-server   #5.7版本 安装php----------- ...

  3. 如何在Ubuntu 18.04上安装和卸载TeamViewer

    卸载命令:sudo apt --purge remove teamviewer 安装:https://www.linuxidc.com/Linux/2018-05/152282.htm 如何在Ubun ...

  4. Ubuntu 中软件的安装、卸载以及查看的方法总结

    Ubuntu 中软件的安装.卸载以及查看的方法总结 博客分类: Linux UbuntuDebian配置管理CacheF#  说明:由于图形化界面方法(如Add/Remove... 和Synaptic ...

  5. Ubuntu 16.04及以上 安装/卸载 Docker-CE

    前言 本文仅针对Ubuntu 18.10.18.04.16.04的x86_64的OS与架构下的Docker-CE的安装 卸载老板本 如果已安装,请卸载它们: sudo apt-get remove d ...

  6. ubuntu一些基本软件安装方法

    ubuntu一些基本软件安装方法 首先说明一下 ubuntu 的软件安装大概有几种方式:1. deb 包的安装方式deb 是 debian 系 Linux 的包管理方式, ubuntu 是属于 deb ...

  7. Ubuntu 16.04 LTS安装好需要设置的15件事(喜欢新版本)

    看到这篇文章说明你已经从老版本升级到 Ubuntu 16.04 或进行了全新安装,在安装好 Ubuntu 16.04 LTS 之后建议大家先做如下 15 件事.无论你是刚加入 Ubuntu 行列的新用 ...

  8. Ubuntu 17.10.1安装, 定制

    p { margin-bottom: 0.25cm; line-height: 120% } a:link { } 2018.4.7 Ubuntu 17.10.1安装, 定制, 后续搭建LAMP环境 ...

  9. Ubuntu_搜狗输入法安装

    前言 由于很少使用Linux系统,所以闲下来打算看一看,在安装完成后,遇到无法输入中文的问题.我使用的是小鹤双拼,所以习惯使用搜狗输入法,本文记录一下如何在ubuntu系统下安装小鹤双拼 由于前两次并 ...

随机推荐

  1. ARM的栈指令(转)

    ARM的指令系统中关于栈指令的内容比较容易引起迷惑,这是因为准确描述一个栈的特点需要两个参数: 栈地址的增长方向:ARM将向高地址增长的栈称为递增栈(Descendent Stack),将向低地址增长 ...

  2. 20145325张梓靖 《网络对抗技术》 Web基础

    20145325张梓靖 <网络对抗技术> Web基础 实验内容 开启apahce,设计web前端HTML 设计web前端javascipt 设计web后端mysql 设计web后端php ...

  3. jQuery中清空元素.empty()和.html(''),两种方法的对比

    jQuery 中有 .empty() 和 .html() 两种方式,都能够清空所选父元素中的所有子元素.但是这两者清空元素的方式上,有着很大的区别: 1.empty() jQuery对象.empty( ...

  4. uoj 300 [CTSC2017]吉夫特 - Lucas - 分块 - 动态规划

    题目传送门 戳此处转移 题目大意 给定一个长为$n$的序列,问它有多少个长度大于等于2的子序列$b_{1}, b_{2}, \cdots, b_{k}$满足$\prod_{i = 2}^{k}C_{b ...

  5. 在Ubuntu上更新Chrome到最新的版本

    本操作只限于已经安装了Chrome的Ubuntu系统: Step 1: sudo apt-get update Step 2: sudo apt-get install google-chrome-s ...

  6. topcoder srm 300 div1

    problem1 link 直接模拟即可. import java.util.*; import java.math.*; import static java.lang.Math.*; public ...

  7. checkbox勾选事件,JQ设置css,下拉框JQ选中

    <input id="CheckMainCompany" type="checkbox"/> $(function() { $("#Che ...

  8. Python3基础 list index 全列表查找与指定索引范围查找

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  9. Git rebase的使用

    rebase 在 Git 中整合来自不同分支的修改主要有两种方法:merge 以及 rebase. 在本节中我们将学习什么是“rebase”,怎样使用“rebase”,并将展示该操作的惊艳之处,以及指 ...

  10. 思维|蚂蚁感冒|2014年蓝桥杯A组题解析第七题-fishers

    标题:蚂蚁感冒 长100厘米的细长直杆子上有n只蚂蚁.它们的头有的朝左,有的朝右. 每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒. 当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行. 这些蚂蚁中,有 ...