微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Ubuntu 16.04下安装sogou 拼音输入法的错误问题

引言: sogou输入法是市场上最为好用和流行的输入法,最为良心的是还有Linux版本,这让我等Linux人士欢呼雀跃。在新出的Ubuntu 16.04上安装sogou输入法的时候,碰到了一些问题,主要还是依赖包没有正确安装,我们一起来看如何来解决这个问题。

1. 环境介绍

Ubuntu 16.04,sogou输入法: sogoupinyin_2.0.0.0078_amd64

2. 问题表现

[html] view plain copy
  1. sudodpkg-isogoupinyin_2.0.0.0078_amd64.deb
错误信息如下:
copy
    sogoupinyin:Depends:libopencc2butitisnotinstallableor
  1. libopencc1butitisnotgoingtobeinstalled
  2. Depends:fcitx-libs(>=4.2.7)butitisnotgoingtobeinstalled
  3. Depends:fcitx-libs-qt(>=4.2.7)butitisnotgoingtobeinstalled
  4. Recommends:fonts-droid-fallbackbutitisnotgoingtobeinstalledor
  5. fonts-droidbutitisnotinstallable
  6. E:Unmetdependencies.Try'apt-get-finstall'withnopackages(orspecifyasolution).
一看就知道是依赖包存在问题

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:

copy
    bladestone@bladestone-laptop:~$sudoaptinstallfcitx-libs
  1. Readingpackagelists...Done
  2. Buildingdependencytree
  3. Readingstateinformation...Done
  4. Youmightwanttorun'apt-get-finstall'tocorrectthese:
  5. Thefollowingpackageshaveunmetdependencies:
  6. sogoupinyin:Depends:libopencc2butitisnotinstallableor
  7. Depends:fcitx-libs-qt( Recommends:fonts-droid-fallbackbutitisnotgoingtobeinstalledor
  8. fonts-droidbutitisnotinstallable
  9. E:Unmetdependencies.Try'apt-get-finstall'withnopackages(orspecifyasolution).
试错2:
copy
    bladestone@bladestone-laptop:~$sudoaptinstallfcitx-libs-qt
  1. 试错3:
    copy
    bladestone@bladestone-laptop:~$sudoaptinstallfcitx-libs-qtfcitx-libs
  1. 试错4:

    copy
      bladestone@bladestone-laptop:~$sudoaptinstallfonts-droid-fallback
    1. 试错5:
      copy
        bladestone@bladestone-laptop:~$sudoaptinstalllibopencc1
      1. sogoupinyin:Depends:fcitx-libs(分析: 经过各种尝试,发现依然无法正常解决问题,类库包之间的依赖关系还是非常复杂的。

        5. 问题解决

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

        copy
          sudoaptremovesogoupinyin
        执行过程:
        copy
          Readingpackagelists...Done
        1. Buildingdependencytree
        2. Readingstateinformation...Done
        3. ThefollowingpackageswillbeREMOVED:
        4. sogoupinyin
        5. 0upgraded,0newlyinstalled,1toremoveand43notupgraded.
        6. 1notfullyinstalledorremoved.
        7. Afterthisoperation,42.6MBdiskspacewillbefreed.
        8. Doyouwanttocontinue?[Y/n]y
        9. (Readingdatabase...214444filesanddirectoriescurrentlyinstalled.)
        10. Removingsogoupinyin(2.0.0.0078)...
        11. Processingtriggersforlibglib2.0-0:amd64(2.48.1-1~ubuntu16.04.1)...
        12. Processingtriggersforhicolor-icon-theme(0.15-0ubuntu1)...
        13. Processingtriggersforshared-mime-info(1.5-2ubuntu0.1)...
        14. Processingtriggersforbamfdaemon(0.5.3~bzr0+16.04.20160523-0ubuntu1)...
        15. Rebuilding/usr/share/applications/bamf-2.index...
        16. Processingtriggersforgnome-menus(3.13.3-6ubuntu3)...
        17. Processingtriggersfordesktop-file-utils(0.22-1ubuntu5)...
        18. Processingtriggersformime-support(3.59ubuntu1)...
        5.2 正确的包安装姿势

        copy

          sudoaptinstalllibopencc1fcitx-libsfcitx-libs-qtfonts-droid-fallback
        5.3 重新安装sogou输入法
        copy
          结果 一切顺利,没有报类似的错误信息

          6. 总结

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

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

          版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

          相关推荐