英文版Ubuntu安装Sogou搜狗输入法,并解决不能输入汉字的问题

Linux版本的搜狗输入法下载链接:
https://shurufa.sogou.com/linux
输入法配置说明:
https://shurufa.sogou.com/linux/guide

本文档是在Ubuntu 18.04安装测试,Ubuntu 20.04的安装步骤相同。测试的系统使用的是英文版本,安装时没选中文。
在系统装好后,安装的中文支持。

下载deb包后在本地通过命令行安装:

$ sudo dpkg -i sogoupinyin_4.0.1.2800_x86_64.deb 

如果本地依赖库不全,会报错,参考下面的错误信息,可能不同的操作系统版本或环境会有所差异。

$ sudo dpkg -i sogoupinyin_4.0.1.2800_x86_64.deb 
[sudo] password for dev: 
(Reading database ... 149181 files and directories currently installed.)
Preparing to unpack sogoupinyin_4.0.1.2800_x86_64.deb ...
Unpacking sogoupinyin (4.0.1.2800) over (4.0.1.2800) ...
dpkg: dependency problems prevent configuration of sogoupinyin:
 sogoupinyin depends on fcitx (>= 1:4.2.8); however:
  Package fcitx is not installed.
 sogoupinyin depends on fcitx-frontend-gtk2; however:
  Package fcitx-frontend-gtk2 is not installed.
 sogoupinyin depends on fcitx-frontend-gtk3; however:
  Package fcitx-frontend-gtk3 is not installed.
 sogoupinyin depends on fcitx-frontend-qt5; however:
  Package fcitx-frontend-qt5 is not installed.
 sogoupinyin depends on fcitx-module-x11; however:
  Package fcitx-module-x11 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



You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 sogoupinyin : Depends: fcitx (>= 1:4.2.8) but it is not installed
               Depends: fcitx-frontend-gtk2 but it is not installed
               Depends: fcitx-frontend-gtk3 but it is not installed
               Depends: fcitx-frontend-qt5 but it is not installed
               Depends: fcitx-module-x11 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

根据错误提示,使用命令“apt --fix-broken install”进行自动修复。

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  fcitx fcitx-bin fcitx-config-common fcitx-config-gtk fcitx-data fcitx-frontend-all fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt4 fcitx-frontend-qt5 fcitx-module-dbus fcitx-module-kimpanel fcitx-module-lua
  fcitx-module-x11 fcitx-modules fcitx-ui-classic libdouble-conversion1 libfcitx-config4 libfcitx-core0 libfcitx-gclient1 libfcitx-qt5-1 libfcitx-utils0 libgettextpo0 libmng2 libmysqlclient20 libpresage-data libpresage1v5 libqt4-dbus
  libqt4-declarative libqt4-network libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqt4-xmlpatterns libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqtcore4 libqtdbus4 libqtgui4 libtinyxml2.6.2v5
  libxcb-xinerama0 mysql-common presage qdbus qt-at-spi qt5-gtk-platformtheme qtchooser qtcore4-l10n qttranslations5-l10n
Suggested packages:
  fcitx-m17n fcitx-tools kdialog plasma-widgets-kimpanel libqt4-declarative-folderlistmodel libqt4-declarative-gestures libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer libqt4-dev qt5-image-formats-plugins
  qtwayland5 libicu55 qt4-qtconfig
The following NEW packages will be installed:
  fcitx fcitx-bin fcitx-config-common fcitx-config-gtk fcitx-data fcitx-frontend-all fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt4 fcitx-frontend-qt5 fcitx-module-dbus fcitx-module-kimpanel fcitx-module-lua
  fcitx-module-x11 fcitx-modules fcitx-ui-classic libdouble-conversion1 libfcitx-config4 libfcitx-core0 libfcitx-gclient1 libfcitx-qt5-1 libfcitx-utils0 libgettextpo0 libmng2 libmysqlclient20 libpresage-data libpresage1v5 libqt4-dbus
  libqt4-declarative libqt4-network libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqt4-xmlpatterns libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqtcore4 libqtdbus4 libqtgui4 libtinyxml2.6.2v5
  libxcb-xinerama0 mysql-common presage qdbus qt-at-spi qt5-gtk-platformtheme qtchooser qtcore4-l10n qttranslations5-l10n
0 upgraded, 54 newly installed, 0 to remove and 494 not upgraded.
1 not fully installed or removed.
Need to get 26.8 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

按照上面的步骤,安装完成,参照官方的配置文档进行配置。配置完成后打开一个文本编辑器进行测试(默认切换输入法快捷键Ctrl-Space),发现只能输入英文,不能输入中文,但可以输入中文标点符号。这个问题是由于还缺少一些库,安装后问题解决。

sudo apt-get install libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2 libgsettings-qt1

中文输入法在Ubuntu上出问题比较多,希望大家都能顺利安装、配置好。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

抓饼先生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值