Ubuntu 16.04安装搜狗拼音输入法错误问题的解决方法
程序员文章站
2022-06-29 19:53:29
一、环境介绍
ubuntu 16.04
搜狗输入法: sogoupinyin_2.0.0.0078_amd64
二...
一、环境介绍
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, 请大家彼此周知该情况。
上一篇: 怎么择香椿,一起来看看
下一篇: 中秋节吃糍粑的寓意,这样吃糍粑最好
推荐阅读
-
Ubuntu 16.04下无法安装.deb的解决方法
-
[环境配置]Ubuntu 16.04 源码编译安装OpenCV-3.2.0+OpenCV_contrib-3.2.0及产生的问题
-
Ubuntu Server 16.04安装MySQL设置远程访问出现问题的完美解决方案(error:10061)
-
ubuntu16.04下安装openssh-server报依赖错误的完美解决方法(非常不错)
-
Ubuntu 16.04安装搜狗拼音输入法错误问题的解决方法
-
Windows安装MySQL8.0.16 的步骤及出现错误问题解决方法
-
ubuntu16.04 重新安装pcl的问题 libpcl-dev : Depends: libvtk6-dev but it is not going to be installed
-
ubuntu16.04安装opencv3.1.0遇到cuda的问题 CUDA_nppi_LIBRARY
-
ubuntu安装openssh-server报依赖错误的解决方法
-
Ubuntu16.04 安装 CUDA9.2(总结一些新手容易遇到的问题)