热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Ubuntu16.04安装搜狗拼音输入法错误问题的解决方法

一、环境介绍    Ubuntu 16.04    搜狗输入法: sogoupinyin_2.0

一、环境介绍

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


推荐阅读
  • 学习SLAM的女生,很酷
    本文介绍了学习SLAM的女生的故事,她们选择SLAM作为研究方向,面临各种学习挑战,但坚持不懈,最终获得成功。文章鼓励未来想走科研道路的女生勇敢追求自己的梦想,同时提到了一位正在英国攻读硕士学位的女生与SLAM结缘的经历。 ... [详细]
  • 本文介绍了Linux系统中正则表达式的基础知识,包括正则表达式的简介、字符分类、普通字符和元字符的区别,以及在学习过程中需要注意的事项。同时提醒读者要注意正则表达式与通配符的区别,并给出了使用正则表达式时的一些建议。本文适合初学者了解Linux系统中的正则表达式,并提供了学习的参考资料。 ... [详细]
  • Ubuntu 9.04中安装谷歌Chromium浏览器及使用体验[图文]
    nsitionalENhttp:www.w3.orgTRxhtml1DTDxhtml1-transitional.dtd ... [详细]
  • Ubuntu安装常用软件详细步骤
    目录1.GoogleChrome浏览器2.搜狗拼音输入法3.Pycharm4.Clion5.其他软件1.GoogleChrome浏览器通过直接下载安装GoogleChro ... [详细]
  • 本文介绍了数据库的存储结构及其重要性,强调了关系数据库范例中将逻辑存储与物理存储分开的必要性。通过逻辑结构和物理结构的分离,可以实现对物理存储的重新组织和数据库的迁移,而应用程序不会察觉到任何更改。文章还展示了Oracle数据库的逻辑结构和物理结构,并介绍了表空间的概念和作用。 ... [详细]
  • Webmin远程命令执行漏洞复现及防护方法
    本文介绍了Webmin远程命令执行漏洞CVE-2019-15107的漏洞详情和复现方法,同时提供了防护方法。漏洞存在于Webmin的找回密码页面中,攻击者无需权限即可注入命令并执行任意系统命令。文章还提供了相关参考链接和搭建靶场的步骤。此外,还指出了参考链接中的数据包不准确的问题,并解释了漏洞触发的条件。最后,给出了防护方法以避免受到该漏洞的攻击。 ... [详细]
  • imx6ull开发板驱动MT7601U无线网卡的方法和步骤详解
    本文详细介绍了在imx6ull开发板上驱动MT7601U无线网卡的方法和步骤。首先介绍了开发环境和硬件平台,然后说明了MT7601U驱动已经集成在linux内核的linux-4.x.x/drivers/net/wireless/mediatek/mt7601u文件中。接着介绍了移植mt7601u驱动的过程,包括编译内核和配置设备驱动。最后,列举了关键词和相关信息供读者参考。 ... [详细]
  • 成功安装Sabayon Linux在thinkpad X60上的经验分享
    本文分享了作者在国庆期间在thinkpad X60上成功安装Sabayon Linux的经验。通过修改CHOST和执行emerge命令,作者顺利完成了安装过程。Sabayon Linux是一个基于Gentoo Linux的发行版,可以将电脑快速转变为一个功能强大的系统。除了作为一个live DVD使用外,Sabayon Linux还可以被安装在硬盘上,方便用户使用。 ... [详细]
  • Linux如何安装Mongodb的详细步骤和注意事项
    本文介绍了Linux如何安装Mongodb的详细步骤和注意事项,同时介绍了Mongodb的特点和优势。Mongodb是一个开源的数据库,适用于各种规模的企业和各类应用程序。它具有灵活的数据模式和高性能的数据读写操作,能够提高企业的敏捷性和可扩展性。文章还提供了Mongodb的下载安装包地址。 ... [详细]
  • 本文讨论了在Linux系统中,使用chown命令将django项目目录下的static目录的拥有者从root改为eureka的问题。作者尝试了多种命令,包括chown和sudo chown等,但都没有成功修改拥有者。文章提供了相关目录的权限信息,并补充了项目所在磁盘和操作系统的信息。 ... [详细]
  • Vagrant虚拟化工具的安装和使用教程
    本文介绍了Vagrant虚拟化工具的安装和使用教程。首先介绍了安装virtualBox和Vagrant的步骤。然后详细说明了Vagrant的安装和使用方法,包括如何检查安装是否成功。最后介绍了下载虚拟机镜像的步骤,以及Vagrant镜像网站的相关信息。 ... [详细]
  • STM32与FPGA的对比及学习建议
    本文对比了野火STM32F103指南针板和Xilinx的PYNQ-Z2板(ZYNQ-7020),介绍了野火STM32F103指南针板的学习资料和讲解视频的详细程度,建议初学者学习野火的资料。同时,介绍了STM32开发所用的Keil程序和C指针的重要性。对于ZYNQ-7020的开发,提到了其自带的Linux、Ubuntu18.4系统以及使用SD卡烧入镜像的方法。 ... [详细]
  • 本文介绍了如何在使用emacs时去掉ubuntu的alt键默认功能,并提供了相应的操作步骤和注意事项。 ... [详细]
  • 本文主要讨论了在xps15上安装双系统win10和MacOS后,win10无法正常更新的问题。分析了可能的引导问题,并提供了解决方法。 ... [详细]
  • Centos7.6安装Gitlab教程及注意事项
    本文介绍了在Centos7.6系统下安装Gitlab的详细教程,并提供了一些注意事项。教程包括查看系统版本、安装必要的软件包、配置防火墙等步骤。同时,还强调了使用阿里云服务器时的特殊配置需求,以及建议至少4GB的可用RAM来运行GitLab。 ... [详细]
author-avatar
独斟自饮醉
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有