『开发技巧』全网最详尽手把手教你在Ubuntu安装搜狗输入法
Posted 小宋是呢
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了『开发技巧』全网最详尽手把手教你在Ubuntu安装搜狗输入法相关的知识,希望对你有一定的参考价值。
最近在使用Ubuntu进行开发,用惯了搜狗输入法,所以尝试在Ubuntu上安装使用。发现网络上的教程都不够完整,所以把自己探索安装完整过程记录下来。
0x01:安装fcitx
命令行执行
sudo apt-get install fcitx fcitx-table-wbpy
0x02:设置系统输入法
搜狗输入法已支持Ubuntu1604、1804、1910、2004、2010
各系统安装步骤可能略有不同,以Ubuntu1804为例。
1、添加中文语言支持
打开 系统设置——区域和语言——管理已安装的语言——在“语言”tab下——点击“添加或删除语言”
弹出“已安装语言”窗口,勾选中文(简体),点击应用
回到“语言支持”窗口,在键盘输入法系统中,选择“fcitx”
注:
如果在键盘输入法系统中,没有“fcitx”选项时,建议先打开终端手动安装fcitx:
sudo apt-get install fcitx
等安装成功之后再执行上述步骤
点击“应用到整个系统”,关闭窗口,重启电脑
2、通过命令行安装搜狗输入法
首先在此界面下载搜狗输入法Linux版:https://pinyin.sogou.com/linux/?r=pinyin
sudo dpkg -i sogoupinyin_版本号_amd64.deb
注:
如果安装过程中提示缺少相关依赖,则执行如下命令解决:
sudo apt -f install
3、笔者实践过程:
输入
sudo dpkg -i sogoupinyin_2.4.0.3469_amd64.deb
输出
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
输入
sudo apt install -f
输出
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]
输入“Y”回车
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) ...
再次执行安装搜狗命令
sudo dpkg -i sogoupinyin_2.4.0.3469_amd64.deb
输出
(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) ...
表示安装成功,然后重启系统
配置输入法步骤
1.点击下面图中图标,选择“配置当前输入法”
2.点击又下角“+”号,导入搜狗输入法
3.选择“搜狗个人输入法”,后点击确认
4.选择添加好的搜狗输入法,点击“^”,调制第一位。
完成后,屏幕右上角会出现搜狗图标,搜狗输入法就配置成功可以使用了。
4、注销计算机(重启系统)即可正常使用搜狗输入法
0x03:尾巴
参考1.https://pinyin.sogou.com/linux/help.php
这个博客对你有用的话欢迎收藏转发,也麻烦可爱又爱学的你能赏个赞,菜小宋更博不易,在这里谢过啦。
如果你想学习更多开发技巧与AI算法,欢迎搜索关注笔者公众号“简明AI”,和爱学习讨论的小伙伴一起交流学习。
以上是关于『开发技巧』全网最详尽手把手教你在Ubuntu安装搜狗输入法的主要内容,如果未能解决你的问题,请参考以下文章
『开发技巧』全网最详尽手把手教你在Ubuntu安装搜狗输入法
『开发技巧』全网最详尽手把手教你在Ubuntu安装搜狗输入法
『开发技巧』全网最详尽手把手教你在Ubuntu安装搜狗输入法
『开发技巧』全网最详尽解决Ubuntu安装NVIDIA驱动报错“nvidia-drm”或“nvidia-modeset”的方法
『开发技巧』全网最详尽Ubuntu中VSCode命令行间隔过大问题
游戏开发实战手把手教你在Windows上通过WSL运行Skynet,不用安装虚拟机,方便快捷(WSL | Linux | Ubuntu | Skynet | VSCode)