Ubuntu 16.04安装搜狗拼音输入法错误问题的解决方法

一、环境介绍

Ubuntu 16.04

搜狗输入法: sogoupinyin_2.0.0.0078_amd64

二、问题表现

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). 

一看就知道是依赖包存在问题

三、问题分析

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

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

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

四、试错分析

试错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.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

结果 一切顺利,没有报类似的错误信息

总结

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

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

(0)

相关推荐

  • #实践笔记#Ubuntu配置Apache+PHP+MySQL

    在我早先的一篇文章<#实践笔记#本地配置PHPnow与WordPress>,已经讨论过PHPnow的本地安装教程.但是PHPnow套件是Windows平台下的软件,不适用我现在使用的平台.所以笔者此次尝试了在Ubuntu 11.10平台下的本地服务器配置(配置Apache+PHP+MySQL). 废话少说,步入整体. 流程笔记: 1.打开终端,输入"sudo apt-get install apache2",回车;(安装apache2.0) 2.如有密码请再输入管理员密码,

  • linux服务器用centos还是ubuntu系统

    linux服务器系统多使用CentOS.uBuntu.Gentoo.FreeBSD.Debian. 服务器操作系统应该选择 Debian/Ubuntu 还是 CentOS ,CENTOS现在市场占有率第一了 [小议]centos与ubuntu的区别 CentOS(Community ENTerprise Operating System)是Linux发行版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成.由于出自同样的源代码,因此有些要求高

  • 为Linux安装红旗紫光输入法

    可以下载标准版或者for Magic Linux的版本,实际上,for Magic Linux的版本也可以在RH 9下使用. 然后,运行 rpm -ivh rf-xim-input-5.0-43.i386.rpm --nodep rpm -ivh ctrlpanel-1.5.5.rpm --nodep 进行输入法安装.然后: cd /etc/X11/xinit/xinitrc.d/ mv /etc/profile.d/rfinput.sh xinput 然后修改xinput末尾的 # rfinp

  • Linux中巧妙安装红旗紫光输入法

    可以下载标准版或者for Magic Linux的版本,实际上,for Magic Linux的版本也可以在RH 9下使用. 然后,运行 rpm -ivh rf-xim-input-5.0-43.i386.rpm --nodep rpm -ivh ctrlpanel-1.5.5.rpm --nodep 进行输入法安装.然后: cd /etc/X11/xinit/xinitrc.d/ mv /etc/profile.d/rfinput.sh xinput 然后修改xinput末尾的 # rfinp

  • 使用批处理实现软件的自动安装以安装搜狗拼音为例

    下面以安装搜狗拼音为例做个小实验,其他软件的安装可以以此作为参考来实现. 实验目标: 使用批处理实现搜狗拼音的自动安装 实验步骤: 1.下载搜狗拼音的安装包,本实验使用sogou_pinyin_50a.exe. 2.在安装包所在目录下新建批处理文件sogou_install.bat. 3.编辑批处理文件sogou_install.bat,输入以下命令并保存. [plain] start /wait .\sogou_pinyin_50a.exe /S 4.双击批处理文件执行之. 5.要是以管理员身

  • Ubuntu 命令行修改网络配置方法

    1. 以DHCP方式配置网卡 编辑文件/etc/network/interfaces: sudo vi /etc/network/interfaces 并用下面的行来替换有关eth0的行: # The primary network interface - use DHCP to find our address auto eth0 iface eth0 inet dhcp 用下面的命令使网络设置生效: sudo /etc/init.d/networking restart 也可以在命令行下直接

  • BAT批处理实现软件的自动安装(以搜狗拼音为例)

    下面以安装搜狗拼音为例做个小实验,其他软件的安装可以以此作为参考来实现. 实验目标: 使用批处理实现搜狗拼音的自动安装 实验步骤: 1.下载搜狗拼音的安装包,本实验使用sogou_pinyin_50a.exe. 2.在安装包所在目录下新建批处理文件sogou_install.bat. 3.编辑批处理文件sogou_install.bat,输入以下命令并保存. 复制代码 代码如下: start /wait .\sogou_pinyin_50a.exe /S 4.双击批处理文件执行之. 5.要是以管

  • ubuntu14.04+docker的安装及使用

    安装 官方推荐在ubuntu安装,本文选择在ubuntu14.04作为宿主系统. 系统更新 复制代码 代码如下: sudo apt-get update && apt-get upgrade -y sudo reboot     #最好重启一下  安装docker 复制代码 代码如下: curl -s https://get.docker.io/ubuntu/ | sudo sh  基础命令 复制代码 代码如下: # 下载一个ubuntu镜像 sudo docker pull ubuntu

  • [Linux]输入法xsim安装方法

    希望此文能解决各位在安装xsim时遇上的问题 从http://sourceforge.net/projects/xsim 可获得xsim,目前的稳定版本是0.3.9.4,强烈建议大家以root登录系统执行安装,这样可以避免一些莫名其妙的问题. 首先请检查软件包是否安装完全.c++,db,db-devel是必需的,如果希望将状态窗口放在KDE的任务条上,系统中需要有kdelibs3-devel包. 接下来检查locale,相信大家都是中文locale,如果你需要输入GBK汉字,让root用户也能使

  • Ubuntu 14.04下安装Eclipse的经验分享

    ubuntu系统自带有openjdk,在终端中输入java -version命令,会有一些提示,这对后面安装没有影响主要是让大家了解一下 1 # 首先到http://www.oracle.com/technetwork/java/javase/downloads/下载jdk,我下载的是最新版jdk-8u20-linux-i586.tar.gz,下载完成使用命令 sudo tar zxvf jdk-8u20-linux-i586.tar.gz 解压 2 # 然后将解压好的jdk1.8.0_20文件

随机推荐