Article From:https://www.cnblogs.com/zhugeanran/p/9122565.html

Obviously, there are many things to do, but I don’t know what to do. This feeling is very exciting.

1. Basic knowledge

      In the native ubuntu14.04 English environment system, only IBus pinyin is really hard to use. Since Sogou input is really much better than the other Chinese input methods under the Linux system, I decided to install the search for a dog in my Ubuntu 14.04 system.The input method under the Linux system is based on the input method framework, with the input method framework and the specific input method. A framework often has multiple input methods, and a framework often has input methods in many languages. In the history of Linux, a variety of input method frameworks, such as SCI, have been introduced.M, fcitx, IBus and so on. The replacement of the input method framework is also frequent. For example, the SCIM input method framework, which was once very popular, is basically on the decline. In the latest Ubuntu systems and Fedora systems, the default is to use the IBus framework, but it is a dog hunt.The input method is based on the fcitx input method framework. Fortunately, the default input method framework of Linux system can be configured, or in the software source of Ubuntu, there is a software package of fcitx input method framework.

Two. Steps to install the method of Sogou input

1、Configuring Ubuntu

      In system settings -&gt, language support, select language and apply it to the system.

                             

Note: after reconfiguring, it is necessary to restart the system to take effect. However, if the computer has not installed fcitx, then install the input method frame and restart it together.

Note: during the execution of this step, the bottom picture prompt box may appear, which leads to the failure to select the language option normally because the software database is destroyed.

Solution: run with the prompt box prompt, the sudo apt-get install -f command, which is the command to fix the dependency (depends), that if a package does not satisfy the dependency on your system, the command will selfMove to fix, install the package dependent package. It can be solved without an accident.

     If not, try to execute sudo apt-get update and sudo apt-get upgrade two commands.

2、Configuration input method framework

      Sogou input method is built on the fcitx framework, so the input method framework should be selected as fictx.

                       

If there is no fcitx option, then you need to install the fcitx framework and configure it. The installation method is

                                

After configuring the input method framework, restart the Ubuntu system. If the configuration is successful after reboot, the fcitx settings option (a keypad icon) will appear in the upper right-hand corner of the taskbar.

                           

3、Installation of Sogou Pinyin input method

      Visit Sogou input method Linux version of the official website, http://pinyin.sogou.com/linux, Download Sogou input method Linux version. It can be seen from the official website that the official input method only supports Ubuntu (but there is a conversion of DEB packets on the Internet.The RPM package can also be used on Fedora.

           

 

When the download is completed, usedpkg -i *.deb Install the Sogou input method. After installation, you can switch the Chinese and English input method through the Shift key. But if you want to use it, you need to restart Ubuntu once, and at this point, you can get it done.

Note: in the process of installation, if the following information is wrong, it is because the download process is wrong, or the version problem is downloaded or replaced with the version.

Normally, it can be used after installation is successful, but some Ubuntu versions also need to manually add the input method. The specific steps are as follows:

1、Click the small keyboard in the upper right, select the configuration option, some version is the Configure Current Input Method option, the figure is already added, so there will be a Sogou Icon

2、Click “+” to add the input method as shown in the figure

3、Choose Sogou input method (remember to check the selected part of the map), because I have already chosen the option.

 Three, VIM usage description

      If you use VIM, you need the VIM support for the Chinese side to use the input method in VIM, and the VIM that is now installed is supported by the Chinese, if you don’t support the installation of a Chinese plug-in. The installation method of the specific plug-in can be searched directly on the Internet.

Attached with the use of the chart.

    When we downloaded WineQQ2012-20120719-Longene.deb to Downloads, we opened the terminal (control+alt+T), and then we entered it under the default command line.
  sudo dpkg -i WineQQ2012-20120719-Longene.deb
  After returning to the car, we found the following error code:
  dpkg: error processing WineQQ2012-20120719-Longene.deb (–install):
  cannot access archive: No such file or directory
  Errors were encountered while processing:
  WineQQ2012-20120719-Longene.deb

  Do you know why? Because our operation is not under the installation folder, that is, the command line default is / directory, this directory does not have our installation files, of course, it will not be installed!

SECOND.The improved commands are as follows
First, enter the folder where the installation files are, so we write in terminal commands.
admin@admin-ThinkPad-Edge:~$ cd Downloads
Back to the back of the car
admin@admin-ThinkPad-Edge:~/Downloads$Is it not the same??!!!!
Then we retype the installation command as follows
admin@admin-ThinkPad-Edge:~/Downloads$ sudo dpkg -i WineQQ2012-20120719-Longene.deb
And then you guess what’s going to happen? Look at it.
Selecting previously unselected package wine-qq2012-longeneteam.
(Reading database … 195491 files and directories currently installed.)
Unpacking wine-qq2012-longeneteam (from WineQQ2012-20120719-Longene.deb) …
 #        ####   #    #   ####   ######  #    #  ######
 #       #    #  ##   #  #    #  #       ##   #  #
 #       #    #  # #  #  #       #####   # #  #  #####
 #       #    #  #  # #  #  ###  #       #  # #  #
 #       #    #  #   ##  #    #  #       #   ##  #
 ######   ####   #    #   ####   ######  #    #  ######
*    Extracting …………
Setting up wine-qq2012-longeneteam (2012.06.15) …
ldconfig….
*    Create desktop icon……
*    Create system menu entry……
*    Done.
Processing triggers for bamfdaemon …
Rebuilding /usr/share/applications/bamf.index…
Processing triggers for desktop-file-utils …
Processing triggers for gnome-menus …
At this time, our QQ installation is successful! Try it on

1.  Environmental introduction

   Ubuntu 16.04,   sogouInput method: sogoupinyin_2.0.0.0078_amd64

2.  Problem performance

[html] view plain copy

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

   The wrong information is as follows:

[html] view plain copy

 
  1. sogoupinyin : Depends: libopencc2 but it is not installable or  
  2. libopencc1 but it is not going to be installed  
  3. Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed  
  4. Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed  
  5. Recommends: fonts-droid-fallback but it is not going to be installed or  
  6. fonts-droid but it is not installable  
  7. E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).  

I know it depends on the problem of the package.

3.  problem analysis

   There was no such problem when using the same Sogou version at the time of Ubuntu 15.10. However, there are such problems in Ubuntu 16.04, which shows that after the Ubuntu upgrade, the Sogou input method has not made corresponding system compatibility.Sex test, so the highest Ubuntu support version is 15.10.

    Although we know the problem, how should we solve it?

    Based on the error message, we found that the dependency package has the following: libopencc1 libopencc2, fcitx-libs, fcitx-libs-qt font-droid-fallback. font-droid-fallback.

4.  Trial and error analysis

     Trial and error 1:

[html] view plain copy

 
  1. bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs  
  2. Reading package lists… Done  
  3. Building dependency tree         
  4. Reading state information… Done  
  5. You might want to run ‘apt-get -f install’ to correct these:  
  6. The following packages have unmet dependencies:  
  7.  sogoupinyin : Depends: libopencc2 but it is not installable or  
  8.                         libopencc1 but it is not going to be installed  
  9.                Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed  
  10.                Recommends: fonts-droid-fallback but it is not going to be installed or  
  11.                            fonts-droid but it is not installable  
  12. E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).  

   Trial and error 2

[html] view plain copy

 
  1. bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qt  
  2. Reading package lists… Done  
  3. Building dependency tree         
  4. Reading state information… Done  
  5. You might want to run ‘apt-get -f install’ to correct these:  
  6. The following packages have unmet dependencies:  
  7.  sogoupinyin : Depends: libopencc2 but it is not installable or  
  8.                         libopencc1 but it is not going to be installed  
  9.                Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed  
  10.                Recommends: fonts-droid-fallback but it is not going to be installed or  
  11.                            fonts-droid but it is not installable  
  12. E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).  

   Trial and error 3:

[html] view plain copy

 
  1. bladestone@bladestone-laptop:~$ sudo apt install fcitx-libs-qt fcitx-libs  
  2. Reading package lists… Done  
  3. Building dependency tree         
  4. Reading state information… Done  
  5. You might want to run ‘apt-get -f install’ to correct these:  
  6. The following packages have unmet dependencies:  
  7.  sogoupinyin : Depends: libopencc2 but it is not installable or  
  8.                         libopencc1 but it is not going to be installed  
  9.                Recommends: fonts-droid-fallback but it is not going to be installed or  
  10.                            fonts-droid but it is not installable  
  11. E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).  

  Trial and error 4:

 

[html] view plain copy

 
  1. bladestone@bladestone-laptop:~$ sudo apt install fonts-droid-fallback  
  2. Reading package lists… Done  
  3. Building dependency tree         
  4. Reading state information… Done  
  5. You might want to run ‘apt-get -f install’ to correct these:  
  6. The following packages have unmet dependencies:  
  7.  sogoupinyin : Depends: libopencc2 but it is not installable or  
  8.                         libopencc1 but it is not going to be installed  
  9.                Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed  
  10.                Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed  
  11. E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).  

  Trial and error 5:

[html] view plain copy

 
  1. bladestone@bladestone-laptop:~$ sudo apt install libopencc1  
  2. Reading package lists… Done  
  3. Building dependency tree         
  4. Reading state information… Done  
  5. You might want to run ‘apt-get -f install’ to correct these:  
  6. The following packages have unmet dependencies:  
  7.  sogoupinyin : Depends: fcitx-libs (>= 4.2.7) but it is not going to be installed  
  8.                Depends: fcitx-libs-qt (>= 4.2.7) but it is not going to be installed  
  9.                Recommends: fonts-droid-fallback but it is not going to be installed or  
  10.                            fonts-droid but it is not installable  
  11. E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).  

 Analysis: after various attempts, it is found that it is still not normal to solve the problem, and the dependencies between the class library packages are still very complex.

5. Problem solving

   5.1 Remove the Sogou input method because of its incomplete installation

[html] view plain copy

 
  1. sudo apt remove sogoupinyin  

  Implementation process:

[html] view plain copy

 
  1. Reading package lists… Done  
  2. Building dependency tree         
  3. Reading state information… Done  
  4. The following packages will be REMOVED:  
  5.   sogoupinyin  
  6. 0 upgraded, 0 newly installed, 1 to remove and 43 not upgraded.  
  7. 1 not fully installed or removed.  
  8. After this operation, 42.6 MB disk space will be freed.  
  9. Do you want to continue? [Y/n] y  
  10. (Reading database … 214444 files and directories currently installed.)  
  11. Removing sogoupinyin (2.0.0.0078) …  
  12. Processing triggers for libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) …  
  13. Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) …  
  14. Processing triggers for shared-mime-info (1.5-2ubuntu0.1) …  
  15. Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160523-0ubuntu1) …  
  16. Rebuilding /usr/share/applications/bamf-2.index…  
  17. Processing triggers for gnome-menus (3.13.3-6ubuntu3) …  
  18. Processing triggers for desktop-file-utils (0.22-1ubuntu5) …  
  19. Processing triggers for mime-support (3.59ubuntu1) …  

  5.2 Correct package installation position

 

[html] view plain copy

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

  5.3 Reinstall the Sogou input method

[html] view plain copy

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

  It turned out all right, and there was no similar error message.

6. summary

    Installation depends on the installation of a complete installation, not a single installation, mainly because there will be a certain dependency between the packages, this is you can not accurately locate, so in an installation action finished.

  In addition, the Linux version of the Sogou input method is currently only compatible with Ubunut 15.10. Please let us know each other well.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *