"Development skills" is the most detailed in the whole network. I'll teach you how to install Sogou input method in Ubuntu

Recently, I'm using Ubuntu for development. I'm used to Sogou input method, so I try to install it on Ubuntu. I found that the tutorials on the network were not complete, so I recorded the whole process of my exploration and installation.

0x01: installing fcitx

Command line execution

sudo apt-get install fcitx fcitx-table-wbpy

0x02: set system input method

The Sogou input method supports Ubuntu 1604, 1804, 1910, 2004 and 2010

The installation steps of each system may be slightly different. Take Ubuntu1804 as an example.

1. Add Chinese language support

Open system settings - region and language - manage installed languages - under the "language" tab - click "add or remove languages"

Pop up the "installed language" window, check Chinese (Simplified), and click apply

Return to the "language support" window and select "fcitx" in the keyboard input method system

Note:

If there is no "fcitx" option in the keyboard input method system, it is recommended to open the terminal and install fcitx manually:

sudo apt-get install fcitx

Perform the above steps after the installation is successful

Click "apply to the whole system", close the window and restart the computer

2. Install Sogou input method from the command line

First, Download Sogou input method for Linux on this interface: https://pinyin.sogou.com/linux/?r=pinyin

sudo dpkg -i sogoupinyin_Version number_amd64.deb

Note:

If you are prompted that there are no related dependencies during installation, execute the following command to solve the problem:

sudo apt -f install

3. Author's practice process:

input

sudo dpkg -i sogoupinyin_2.4.0.3469_amd64.deb 

output

Selecting previously unselected package sogoupinyin.
(Reading database ... 285619 files and directories currently installed.)
Preparing to unpack sogoupinyin_2.4.0.3469_amd64.deb ...
Unpacking sogoupinyin (2.4.0.3469) ...
dpkg: dependency problems prevent configuration of sogoupinyin:
 sogoupinyin depends on fcitx-libs | libfcitx-qt0; however:
  Package fcitx-libs is not installed.
  Package libfcitx-qt0 is not installed.
 sogoupinyin depends on libqt5qml5; however:
  Package libqt5qml5 is not installed.
 sogoupinyin depends on libqt5quick5; however:
  Package libqt5quick5 is not installed.
 sogoupinyin depends on libqt5quickwidgets5; however:
  Package libqt5quickwidgets5 is not installed.
 sogoupinyin depends on qml-module-qtquick2; however:
  Package qml-module-qtquick2 is not installed.

dpkg: error processing package sogoupinyin (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 sogoupinyin

input

sudo apt install -f

output

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.4.0-67-generic linux-hwe-5.4-headers-5.4.0-66 linux-hwe-5.4-headers-5.4.0-67
  linux-image-5.4.0-67-generic linux-modules-5.4.0-67-generic linux-modules-extra-5.4.0-67-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  fcitx-libs libfcitx-qt0 libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2
Suggested packages:
  qt5-qmltooling-plugins
The following NEW packages will be installed:
  fcitx-libs libfcitx-qt0 libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2
0 upgraded, 6 newly installed, 0 to remove and 77 not upgraded.
1 not fully installed or removed.
Need to get 2,583 kB of archives.
After this operation, 10.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Enter "Y" enter

Get:1 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 libfcitx-qt0 amd64 1:4.2.9.6-1 [69.0 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 fcitx-libs all 1:4.2.9.6-1 [4,136 B]
Get:3 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libqt5qml5 amd64 5.9.5-0ubuntu1.1 [1,242 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libqt5quick5 amd64 5.9.5-0ubuntu1.1 [1,201 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 libqt5quickwidgets5 amd64 5.9.5-0ubuntu1.1 [35.7 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 qml-module-qtquick2 amd64 5.9.5-0ubuntu1.1 [31.4 kB]
Fetched 2,583 kB in 5s (555 kB/s)              
Selecting previously unselected package libfcitx-qt0:amd64.
(Reading database ... 286466 files and directories currently installed.)
Preparing to unpack .../0-libfcitx-qt0_1%3a4.2.9.6-1_amd64.deb ...
Unpacking libfcitx-qt0:amd64 (1:4.2.9.6-1) ...
Selecting previously unselected package fcitx-libs.
Preparing to unpack .../1-fcitx-libs_1%3a4.2.9.6-1_all.deb ...
Unpacking fcitx-libs (1:4.2.9.6-1) ...
Selecting previously unselected package libqt5qml5:amd64.
Preparing to unpack .../2-libqt5qml5_5.9.5-0ubuntu1.1_amd64.deb ...
Unpacking libqt5qml5:amd64 (5.9.5-0ubuntu1.1) ...
Selecting previously unselected package libqt5quick5:amd64.
Preparing to unpack .../3-libqt5quick5_5.9.5-0ubuntu1.1_amd64.deb ...
Unpacking libqt5quick5:amd64 (5.9.5-0ubuntu1.1) ...
Selecting previously unselected package libqt5quickwidgets5:amd64.
Preparing to unpack .../4-libqt5quickwidgets5_5.9.5-0ubuntu1.1_amd64.deb ...
Unpacking libqt5quickwidgets5:amd64 (5.9.5-0ubuntu1.1) ...
Selecting previously unselected package qml-module-qtquick2:amd64.
Preparing to unpack .../5-qml-module-qtquick2_5.9.5-0ubuntu1.1_amd64.deb ...
Unpacking qml-module-qtquick2:amd64 (5.9.5-0ubuntu1.1) ...
Setting up libqt5qml5:amd64 (5.9.5-0ubuntu1.1) ...
Setting up libqt5quick5:amd64 (5.9.5-0ubuntu1.1) ...
Setting up qml-module-qtquick2:amd64 (5.9.5-0ubuntu1.1) ...
Setting up libqt5quickwidgets5:amd64 (5.9.5-0ubuntu1.1) ...
Setting up libfcitx-qt0:amd64 (1:4.2.9.6-1) ...
Setting up sogoupinyin (2.4.0.3469) ...
Setting up fcitx-libs (1:4.2.9.6-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...

Execute the install Sogou command again

sudo dpkg -i sogoupinyin_2.4.0.3469_amd64.deb

output

(Reading database ... 286507 files and directories currently installed.)
Preparing to unpack sogoupinyin_2.4.0.3469_amd64.deb ...
Unpacking sogoupinyin (2.4.0.3469) over (2.4.0.3469) ...
Setting up sogoupinyin (2.4.0.3469) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...

Indicates that the installation is successful, and then restart the system

To configure IME

1. Click the icon in the figure below and select "configure current input method"

2. Click the "+" sign in the lower corner to import Sogou input method

3. Select "Sogou personal input method" and click OK

4. Select the added Sogou input method and click "^" to modulate the first bit.

After completion, the Sogou icon will appear in the upper right corner of the screen, and the Sogou input method will be configured successfully and can be used.

4. Log off the computer (restart the system) to use Sogou input method normally

0x03: tail

Reference 1 https://pinyin.sogou.com/linux/help.php

Added by akimm on Wed, 05 Jan 2022 21:24:49 +0200