Ubuntu中fcitx安裝失敗問題的原因是ubuntu用的是國外鏡像源,部分軟體下載下傳不了。
對策:
更換國内鏡像源可以使 Ubuntu 的第三方軟體包的下載下傳速度大步提升,這裡以更換為阿裡源為例:
源檔案的相關資訊在“/etc/apt/”路徑下,使用cd /etc/apt進入檔案
源連結存放在檔案[ sources.list ]中,進入檔案:sudo nano sources.list
将[ sources.list ]中的内容都删除,替換成下面阿裡雲的連結:
1、進入阿裡源官方鏡像站:
https://developer.aliyun.com/mirror/
2、點選 Ubuntu 進入:
https://developer.aliyun.com/mirror/ubuntu
3.下載下傳複制對應版本的源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# 先備份系統原有的軟體源配置
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
# 将複制的阿裡源粘貼到建立的 sources.list 中
sudo vi /etc/apt/sources.list
更新軟體源以及更新軟體:
sudo apt-get update && apt-get upgrade
換好源後,根據最後根據這個步驟安裝即可
https://pinyin.sogou.com/linux/guide
個人安裝依次用到的指令如下:
1.sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
(源表備份)
2.sudo vi /etc/apt/sources.list
(vim打開源表,保留原表資訊,然後将aliyun的源直接複制在源表的末尾,儲存退出)
3.sudo apt-get update && apt-get upgrade
(更新源表及軟體資訊,直接删除源表可能導緻以前安裝的軟體找不到路徑打不開了)
4.sudo apt-get install fcitx(安裝fcitx,中間需要下載下傳漢字(簡體版))
5.sudo dpkg -i sogoupinyin_4.0.1.2123_amd64.deb(安裝搜狗輸入法,這一步需要提前在https://pinyin.sogou.com/linux/guide下載下傳好linux)
6.安裝輸入法依賴
在終端執行
sudo apt install libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2
sudo apt install libgsettings-qt1
7.重新開機系統
8.設定将搜狗^頂上去,第一個即可。完成漢字輸入(最後删掉搜狗安裝包即可)

本文轉自:https://blog.csdn.net/weixin_42192030/article/details/124597438