Ubuntu 16.04 installation of sogou pinyin input method error solution
- 2020-05-13 04:14:51
- OfStack
1. Environment introduction
Ubuntu 16.04
Sogou input method: sogoupinyin_2.0.0.0078_amd64
2. Problem presentation
sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb
The error message is as follows:
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).
You can tell that there is a problem with dependent packages
3. Problem analysis
The same version of sogou was used in the previous version of Ubuntu 15.10 without such problems. However, such problems exist in Ubuntu 16.04, indicating that after the upgrade of Ubuntu, the sogou input method has not been tested for system compatibility, so the highest Ubuntu support version is 15.10.
Although we know the problem, how to solve it?
Based on the error information, we found the following dependency packages: libopencc1 libopencc2, fcitx-libs, fcitx-libs-qt font-droid-fallback.
4. Trial-and-error analysis
Trial and error 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).
Trial and error. 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).
Trial and error:
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).
Trial and error. 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).
Trial and error 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).
Analysis: after various attempts, I found that the problem could not be solved normally, and the dependencies between the library packages were very complex.
5. Problem solving
5.1 remove the sogou input method due to its incomplete installation
sudo apt remove sogoupinyin
Execution process:
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 correct package installation posture
sudo apt install libopencc1 fcitx-libs fcitx-libs-qt fonts-droid-fallback
5.3 reinstall the sogou input method
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).
0
Results 1 cut smoothly, no similar error message was reported
conclusion
Installation dependencies need to be installed once, do not install a single, mainly because there will be a fixed dependencies between packages, which you can not accurately locate, so in the first installation action to complete.
It is also important to note that the Linux version of the sogou input method is currently only compatible with Ubunut 15.10, please let each other know this situation.