服务器 
首页 > 服务器 > 浏览文章

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

(编辑:jimmy 日期: 2024/9/17 浏览:3 次 )

一、环境介绍

   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"htmlcode">
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, 请大家彼此周知该情况。

上一篇:Openstack 节点维护详细讲解
下一篇:linux中如何添加用户并赋予root权限详解
一文看懂荣耀MagicBook Pro 16
荣耀猎人回归!七大亮点看懂不只是轻薄本,更是游戏本的MagicBook Pro 16.
人们对于笔记本电脑有一个固有印象:要么轻薄但性能一般,要么性能强劲但笨重臃肿。然而,今年荣耀新推出的MagicBook Pro 16刷新了人们的认知——发布会上,荣耀宣布猎人游戏本正式回归,称其继承了荣耀 HUNTER 基因,并自信地为其打出“轻薄本,更是游戏本”的口号。
众所周知,寻求轻薄本的用户普遍更看重便携性、外观造型、静谧性和打字办公等用机体验,而寻求游戏本的用户则普遍更看重硬件配置、性能释放等硬核指标。把两个看似难以相干的产品融合到一起,我们不禁对它产生了强烈的好奇:作为代表荣耀猎人游戏本的跨界新物种,它究竟做了哪些平衡以兼顾不同人群的各类需求呢?
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap