你還在為樹莓派無法安裝中文輸入法而到處找教程嗎?
你還在為樹莓派每次下載都要遠隔重洋獲取資源,龜速下載而煩惱嗎?
為了解決這個問題,在這篇樹莓派教程中,我將手把手叫你怎樣安裝 清華鏡像系統和中文輸入法Fcitx及Google拼音輸入法。
步驟一:換源:將下載源從樹莓派默認國外源切換到國內清華大學/中國科技大學開源軟件鏡像站
在樹莓派的命令行界面輸入
1 sudo nano /etc/apt/sources.list

使用鍵盤方向鍵控制,在第一行開頭加一個#,把下面的內容拷貝到最后一行之后,如圖中的效果:
清華鏡像源:https://mirror.tuna.tsinghua.edu.cn/help/raspbian/

清華鏡像源:
1 deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib 2 deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main non-free contrib
中國科技大學鏡像源:
1 deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi 2 deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

先按鍵盤上的ctrl+o,再按回車保存,再按ctrl+x退出nano編輯器回到命令行界面。再輸入以下命令更新到清華大學/中國科技大學鏡像源最新的軟件列表。
1 sudo apt-get update

這個命令,會訪問源列表里的每個網址,並讀取軟件列表,然后保存在樹莓派本地。
以上步驟實現了Respbian的包管理器apt-get換源到清華大學軟件鏡像站,並更新了軟件列表,今后在樹莓派命令行中執行sudo apt-get install 軟件名時便會自動從清華大學開源軟件鏡像站高速下載。
步驟二:換輸入法:安裝中文輸入法Fcitx及Google拼音輸入法
在樹莓派命令行輸入:
1 sudo apt-get install fcitx fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sunpinyin
運行到希望執行時輸入:Y+回車

當遇到需要更新時,輸入q+回車

中途彈出窗口選擇:Yes 即可
等待安裝完成即可.......
步驟三:重啟系統
在樹莓派命令行界面輸入:
1 sudo reboot
重啟系統即可。

恭喜你已成功學會在樹莓派3B/3B+ 清華鏡像系統和安裝中文輸入法Fcitx及Google拼音輸入法。

