服务器之家:专注于服务器技术及软件下载分享
分类导航

Linux|Centos|Ubuntu|系统进程|Fedora|注册表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服务器之家 - 服务器系统 - Ubuntu - Ubuntu 16.04安装搜狗拼音输入法错误问题的解决方法

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

2021-11-26 16:31bladestone Ubuntu

目前来说搜狗输入法是市场上最为好用和流行的输入法,最为良心的是还有Linux版本,这让众多Linux人士欢呼雀跃。最近在新出的Ubuntu 16.04上安装sogou输入法的时候,碰到了一些问题,主要还是依赖包没有正确安装,下面让我们一起

一、环境介绍

   Ubuntu 16.04

   搜狗输入法: sogoupinyin_2.0.0.0078_amd64

二、问题表现

?
1
sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb

错误信息如下:

?
1
2
3
4
5
6
7
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:

?
1
2
3
4
5
6
7
8
9
10
11
12
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:   

?
1
2
3
4
5
6
7
8
9
10
11
12
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:

?
1
2
3
4
5
6
7
8
9
10
11
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:

?
1
2
3
4
5
6
7
8
9
10
11
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:

?
1
2
3
4
5
6
7
8
9
10
11
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输入法, 由于其安装不完整

?
1
sudo apt remove sogoupinyin

执行过程:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 正确的包安装姿势

?
1
sudo apt install libopencc1 fcitx-libs fcitx-libs-qt fonts-droid-fallback

5.3 重新安装sogou输入法

?
1
sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb

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

总结

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

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

原文链接:http://blog.csdn.net/blueheart20/article/details/51901867

延伸 · 阅读

精彩推荐
  • Ubuntu如何在ubuntu系统中安装pycharm工具并运行

    如何在ubuntu系统中安装pycharm工具并运行

    在Windows系统中安装pycharm,只需要下载安装包,然后根据指令一步一步操作;而在Linux系统中的Ubuntu中安装pycharm,需要下载安装包,还有安装相关的其他软件...

    百度经验12082019-10-21
  • UbuntuUbuntu 15.04升级到Ubuntu 15.10的详细教程

    Ubuntu 15.04升级到Ubuntu 15.10的详细教程

    ubuntu15.04怎么升级到ubuntu15.10?又该升级系统了,但是很多人对ubuntu系统很不熟悉,下面我们一起来看看ubuntu15.04升级ubuntu15.10的详细教程,需要的朋友可以...

    服务器之家4562019-07-02
  • UbuntuUbuntu下安装Chrome的方法分享

    Ubuntu下安装Chrome的方法分享

    本文给大家分享的是Ubuntu下安装Chrome的方法,安装的过程中发现还是挺麻烦的,就记录下来推荐给大家,有需要的小伙伴可以参考下。...

    Ubuntu教程网3862021-10-25
  • UbuntuWSL、WSL2与Ubuntu性能大PK

    WSL、WSL2与Ubuntu性能大PK

    科技媒体 Phoronix 对 Windows 10 May 2020 中 WSL 和 WSL 2 的性能进行了测试,参与测试的发行版为 Ubuntu 20.04 on WSL/WSL2 ,以及 Ubuntu 20.04 LTS,均被安装在除 Windows 之...

    开源中国29412020-06-23
  • UbuntuUbuntu安装和卸载CUDA和CUDNN的实现

    Ubuntu安装和卸载CUDA和CUDNN的实现

    这篇文章主要介绍了Ubuntu安装和卸载CUDA和CUDNN的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们...

    夜雨飘零14632020-08-04
  • UbuntuUbuntu17.10怎么添加日历事项? Ubuntu添加行程提醒的教程

    Ubuntu17.10怎么添加日历事项? Ubuntu添加行程提醒的教程

    Ubuntu17.10怎么添加日历事项?Ubuntu17.10系统中有一个日程管理功能,可以在日历中添加行程提醒,下面我们就来看看Ubuntu添加行程提醒的教程,需要的朋友可...

    服务器之家2812019-06-19
  • UbuntuUbuntu20.04开启root账户的方法步骤

    Ubuntu20.04开启root账户的方法步骤

    这篇文章主要介绍了Ubuntu20.04开启root账户的方法步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们...

    缀梦13002020-08-01
  • UbuntuUbuntu Gnome下如何修改应用图标icon?

    Ubuntu Gnome下如何修改应用图标icon?

    最近有些朋友问小编Ubuntu Gnome下如何修改应用图标icon?今天小编要为大家分享的是Ubuntu Gnome下修改应用图标icon的方法;有需要的朋友一起去看看吧...

    服务器之家6412019-06-01