学习笔记112—linux系统安装搜狗输入法
1.下载搜狗输入法的安装包
下载地址为:http://pinyin.sogou.com/linux/ ,如下图,要选择与自己系统位数一致的安装包,我的系统是64位,所以我下载64位的安装包
2.按键Ctr+Alt+T打开终端,输入以下命令切换到下载文件夹:
cd ~/Downloads/
查看是否下载完成
ls
安装搜狗输入法
sudo dpkg -i sogoupinyin_2.1.0.0082_amd64.deb
3.从系统设置里面点击“语言支持”,一开始的系统里面是没有小企鹅输入法的,搜狗输入法就是在小企鹅输入法基础上安装的,从语言支持里面选择小企鹅输入法(fcitx),默认为ibus
点击语言支持后,有时候会出现以下错误,不要慌,下面有解决方案
4.此时输入以下命令,对错误进行修复:
sudo apt-get install -f
5.重新打开“语言支持”,你会看到如下情况,证明错误已经修复,选择“安装”按钮
等他安装就好了,不用进行其他操作,期间会提示你输入密码,输入就好了,所有涉及到内核操作的都需要你输入密码,无所谓的,输入就好了。
当安装结束以后,你会看到如下窗口,切记,一定要把系统键盘输入方式从ibus切换为fcitx
6.在终端执行如下命令重启电脑
sudo reboot
重新启动以后,你会发现在屏幕右上方有了企鹅输入fcitx
右键小企鹅,选择configureFcitx
添加搜狗输入发
首先,去掉那个只“显示当前语言”的选项,然后搜索框输入sog,你会发现搜狗输入法已经有了,选中输入法即可
7.然后打开一个能输入文字的软件,比如浏览器,输入文字的时候,恩shift见,你会发现输入法有了,搜狗输入法安装成功,输入文字正常,但是这个时候,输入法显示会乱码,没关系,重启就好了
8.用上面介绍过的重启命令重启电脑,重启以后,输入法就正常了。
参考链接:https://blog.csdn.net/m0_37906230/article/details/82284017
如果直接使用dpki安装会报错,具体如下:
点击(此处)折叠或打开
-
$ sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb
-
Selecting previously unselected package sogoupinyin.
-
(Reading database ... 211651 files and directories currently installed.)
-
Preparing to unpack sogoupinyin_2.0.0.0078_amd64.deb ...
-
Unpacking sogoupinyin (2.0.0.0078) ...
-
dpkg: dependency problems prevent configuration of sogoupinyin:
-
sogoupinyin depends on libopencc2 | libopencc1; however:
-
Package libopencc2 is not installed.
-
Package libopencc1:amd64 is not installed.
-
sogoupinyin depends on fcitx-libs (>= 4.2.7); however:
-
Package fcitx-libs is not installed.
-
sogoupinyin depends on fcitx-libs-qt (>= 4.2.7); however:
-
Package fcitx-libs-qt is not installed.
-
-
dpkg: error processing package sogoupinyin (--install):
-
dependency problems - leaving unconfigured
-
Processing triggers for mime-support (3.59ubuntu1) ...
-
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
-
Rebuilding /usr/share/applications/bamf-2.index...
-
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
-
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
-
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
-
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
-
Processing triggers for libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) ...
-
No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
-
Errors were encountered while processing:
- sogoupinyin
这是缺少一些依赖包,使用如下命令安装依赖:
sudo apt install libopencc1 fcitx-libs fcitx-libs-qt
具体如下:
点击(此处)折叠或打开
-
$ sudo apt install libopencc1 fcitx-libs fcitx-libs-qt
-
Reading package lists... Done
-
Building dependency tree
-
Reading state information... Done
-
The following package was automatically installed and is no longer required:
-
fonts-noto-mono
-
Use 'sudo apt autoremove' to remove it.
-
The following NEW packages will be installed:
-
fcitx-libs fcitx-libs-qt libopencc1
-
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
-
Need to get 622 kB of archives.
-
After this operation, 9,114 kB of additional disk space will be used.
-
Get:1 http://ubuntu.cn99.com/ubuntu xenial/universe amd64 libopencc1 amd64 0.4.3-2build1 [614 kB]
-
Get:2 http://ubuntu.cn99.com/ubuntu xenial/universe amd64 fcitx-libs all 1:4.2.9.1-1ubuntu1 [3,818 B]
-
Get:3 http://ubuntu.cn99.com/ubuntu xenial/universe amd64 fcitx-libs-qt all 1:4.2.9.1-1ubuntu1 [3,790 B]
-
Fetched 622 kB in 0s (1,929 kB/s)
-
Selecting previously unselected package libopencc1:amd64.
-
(Reading database ... 211651 files and directories currently installed.)
-
Preparing to unpack .../libopencc1_0.4.3-2build1_amd64.deb ...
-
Unpacking libopencc1:amd64 (0.4.3-2build1) ...
-
Selecting previously unselected package fcitx-libs.
-
Preparing to unpack .../fcitx-libs_1%3a4.2.9.1-1ubuntu1_all.deb ...
-
Unpacking fcitx-libs (1:4.2.9.1-1ubuntu1) ...
-
Selecting previously unselected package fcitx-libs-qt.
-
Preparing to unpack .../fcitx-libs-qt_1%3a4.2.9.1-1ubuntu1_all.deb ...
-
Unpacking fcitx-libs-qt (1:4.2.9.1-1ubuntu1) ...
-
Setting up libopencc1:amd64 (0.4.3-2build1) ...
-
Setting up fcitx-libs (1:4.2.9.1-1ubuntu1) ...
-
Setting up fcitx-libs-qt (1:4.2.9.1-1ubuntu1) ...
- Processing triggers for libc-bin (2.23-0ubuntu3) ...
然后安装
点击(此处)折叠或打开
-
$ sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb
-
Selecting previously unselected package sogoupinyin.
-
(Reading database ... 211686 files and directories currently installed.)
-
Preparing to unpack sogoupinyin_2.0.0.0078_amd64.deb ...
-
Unpacking sogoupinyin (2.0.0.0078) ...
-
Setting up sogoupinyin (2.0.0.0078) ...
-
Processing triggers for mime-support (3.59ubuntu1) ...
-
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ...
-
Rebuilding /usr/share/applications/bamf-2.index...
-
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
-
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
-
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
-
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
-
Processing triggers for libglib2.0-0:amd64 (2.48.1-1~ubuntu16.04.1) ...
- No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
总结一下安装步骤,两步即可
点击(此处)折叠或打开
-
sudo apt install libopencc1 fcitx-libs fcitx-libs-qt
- sudo dpkg -i sogoupinyin_2.0.0.0078_amd64.deb
下面选择输入法:
1.在Language Support中增加汉语,然后选择输入法系统为fcitx
2.重启系统
3.在Text Entry中增加Sogou Pinyin
4.使用Ctrl+space即可开启搜狗输入法
如果版本是sogoupinyin_2.2.0.0102_amd64.deb
则需要安装的包是:
点击(此处)折叠或打开
- sudo apt install fcitx fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt4 fcitx-module-kimpanel libopencc1 fcitx-libs fcitx-libs-qt libqtwebkit4