Solve the problem of Sogou input method in ubuntu18.04

question

At first, the wordbox was lost after a system upgrade. Based on past experience, delete the configuration file. However invalid. So after uninstalling, download the latest installation package and try to reinstall it. The problem arises, and a dependency problem cannot be solved: the fcitx-libs-qt package that Sogou Pinyin depends on does not exist in the 18.04 source.

The replacement seems to be libfcitx-qt0, I tried to modify the control file in the deb, replace the fcitx-libs-qt replacement with libfcitx-qt0, and repackage it. This can be installed, but to no avail. Go to the 17.10 source to download fcitx-libs-qt, there will be conflicts and cannot coexist with libfcitx-qt0.

Solve the problem

After all kinds of tossing, the problem was finally solved, and the record is as follows.

Download old version

First of all, the latest official version of Sogou (sogoupinyin_2.2.0.0102_amd64.deb) cannot be used. As for why it cannot be used, it has not been studied in depth. An older version (sogoupinyin_2.1.0.0086_amd64.deb) needs to be downloaded:

http://cdn2.ime.sogou.com/dl/index/1491565850/sogoupinyin_2.1.0.0086_amd64.deb

Put the deb package in an empty directory

Create a package directory

mkdir -p extract/DEBIAN

unpack

dpkg-deb -x sogoupinyin_2.1.0.0086_amd64.deb extract/
dpkg-deb -e sogoupinyin_2.1.0.0086_amd64.deb extract/DEBIAN

Modify the control file

Open extract/DEBIAN/control with any text editor, find the Depends line, delete fcitx-libs and fcitx-libs-qt, save and exit.

Package: sogoupinyin
Version: 2.1.0.0086
Architecture: amd64
Maintainer: Ubuntu Kylin Team <[email protected]>
Installed-Size: 53018
Depends: fcitx (>= 1:4.2.8.3-3~), fcitx-frontend-gtk2, fcitx-frontend-gtk3, fcitx-frontend-qt4, fcitx-module-kimpanel, im-config, libopencc2 | libopencc1, lsb-release, unzip, x11-utils, libc6 (>= 2.8), libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.16.0), libidn11 (>= 1.13), libnotify4 (>= 0.7.0), libqt4-dbus (>= 4:4.8.0), libqt4-declarative (>= 4:4.8.0), libqt4-network (>= 4:4.8.0), libqtcore4 (>= 4:4.8.0), libqtgui4 (>= 4:4.8.0), libstdc++6 (>= 4.6), libx11-6, zlib1g (>= 1:1.2.0)
Recommends: fcitx-frontend-qt5, fonts-droid-fallback | fonts-droid, dconf-gsettings-backend | gsettings-backend
Section: non-free/utils
Priority: optional
Homepage: http://pinyin.sogou.com/linux
Description: Sogou Pinyin Input Method
 Based on web search engine technology, Sogou Pinyin input method is
 the next-generation input method designed for Internet users. As it
 is backed with search engine technology, user input method can be
 extremely fast, and it is much more advanced than other input method
 engines in terms of the volume of the vocabulary database and its
 accuracy. Sogou input method is the most popular input methods in
 China, and Sogou promises it will always be free of charge.

Pack

mkdir build
dpkg-deb -b extract/ build/

After execution, a new deb package will be generated in the build directory

Install

First completely uninstall the Sogou input method, and delete the following configuration files

.sogouinput
.config/fcitx
.config/sogou-qimpanel
.config/SogouPY
.config/SogouPY.users
.config/fcitx-qimpanel

Then install our repackaged input method. After restarting, Sogou input method returned to normal.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325462811&siteId=291194637