在安裝中文語言包和中文輸入法之前,我先配置好了pc-arm的交叉編譯環(huán)境和QT,因為我要在qt中使用中文,所以不知道是否應(yīng)該先把開發(fā)環(huán)境配置好再安裝輸入法。
1.更新源列表:
ubuntu上的軟件安裝都需要實時聯(lián)網(wǎng),所以在安裝軟件時都應(yīng)該保持網(wǎng)絡(luò)暢通。安裝軟件需要獲取網(wǎng)絡(luò)資源,這些資源的地址都存在/etc/apt/souces.list這個列表文件里,網(wǎng)絡(luò)上的源有很多,下面我列出一些。
官方源:
#?deb?cdrom:[Ubuntu?12.04.2?LTS?_Precise?Pangolin_?-?Release?i386?(20130213)]/?precise?main?restricted #?See?http://help.ubuntu.com/community/UpgradeNotes?for?how?to?upgrade?to #?newer?versions?of?the?distribution. deb?http://archive.ubuntu.com/ubuntu?precise?main?restricted deb-src?http://archive.ubuntu.com/ubuntu?precise?main?restricted ##?Major?bug?fix?updates?produced?after?the?final?release?of?the ##?distribution. deb?http://archive.ubuntu.com/ubuntu?precise-updates?main?restricted deb-src?http://archive.ubuntu.com/ubuntu?precise-updates?main?restricted ##?N.B.?software?from?this?repository?is?ENTIRELY?UNSUPPORTED?by?the?Ubuntu ##?team.?Also,?please?note?that?software?in?universe?WILL?NOT?receive?any ##?review?or?updates?from?the?Ubuntu?security?team. deb?http://archive.ubuntu.com/ubuntu?precise?universe deb-src?http://archive.ubuntu.com/ubuntu?precise?universe deb?http://archive.ubuntu.com/ubuntu?precise-updates?universe deb-src?http://archive.ubuntu.com/ubuntu?precise-updates?universe ##?N.B.?software?from?this?repository?is?ENTIRELY?UNSUPPORTED?by?the?Ubuntu? ##?team,?and?may?not?be?under?a?free?licence.?Please?satisfy?yourself?as?to? ##?your?rights?to?use?the?software.?Also,?please?note?that?software?in? ##?multiverse?WILL?NOT?receive?any?review?or?updates?from?the?Ubuntu ##?security?team. deb?http://archive.ubuntu.com/ubuntu?precise?multiverse deb-src?http://archive.ubuntu.com/ubuntu?precise?multiverse deb?http://archive.ubuntu.com/ubuntu?precise-updates?multiverse deb-src?http://archive.ubuntu.com/ubuntu?precise-updates?multiverse ##?N.B.?software?from?this?repository?may?not?have?been?tested?as ##?extensively?as?that?contained?in?the?main?release,?although?it?includes ##?newer?versions?of?some?applications?which?may?provide?useful?features. ##?Also,?please?note?that?software?in?backports?WILL?NOT?receive?any?review ##?or?updates?from?the?Ubuntu?security?team. deb?http://archive.ubuntu.com/ubuntu?precise-backports?main?restricted?universe?multiverse deb-src?http://archive.ubuntu.com/ubuntu?precise-backports?main?restricted?universe?multiverse deb?http://archive.ubuntu.com/ubuntu?precise-security?main?restricted deb-src?http://archive.ubuntu.com/ubuntu?precise-security?main?restricted deb?http://archive.ubuntu.com/ubuntu?precise-security?universe deb-src?http://archive.ubuntu.com/ubuntu?precise-security?universe deb?http://archive.ubuntu.com/ubuntu?precise-security?multiverse deb-src?http://archive.ubuntu.com/ubuntu?precise-security?multiverse ##?Uncomment?the?following?two?lines?to?add?software?from?Canonical's ##?'partner'?repository. ##?This?software?is?not?part?of?Ubuntu,?but?is?offered?by?Canonical?and?the ##?respective?vendors?as?a?service?to?Ubuntu?users. deb?http://archive.canonical.com/ubuntu?precise?partner deb-src?http://archive.canonical.com/ubuntu?precise?partner ##?This?software?is?not?part?of?Ubuntu,?but?is?offered?by?third-party ##?developers?who?want?to?ship?their?latest?software. deb?http://extras.ubuntu.com/ubuntu?precise?main deb?http://archive.ubuntu.com/ubuntu?precise-proposed?restricted?main?multiverse?universe deb-src?http://extras.ubuntu.com/ubuntu?precise?main
臺灣大學(xué)源:
#臺灣源(推薦網(wǎng)通用戶使用,電信PING平均響應(yīng)速度41MS。強烈推薦此源,比較完整,較少出現(xiàn)同步問題): deb?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper?main?restricted?universe?multiverse deb-src?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper?main?restricted?universe?multiverse deb?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper-updates?main?restricted?universe?multiverse deb-src?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper-updates?main?restricted?universe?multiverse deb?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper-backports?main?restricted?universe?multiverse deb-src?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper-backports?main?restricted?universe?multiverse deb?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper-security?main?restricted?universe?multiverse deb-src?http://ubuntu.csie.ntu.edu.tw/ubuntu/?dapper-security?main?restricted?universe?multiverse deb?http://fpt.sjtu.edu.cn/ubuntu-cn/?dapper?main?multiverse?restricted?universe
網(wǎng)易源:
#163源: deb?http://mirrors.163.com/ubuntu/?precise?main?restricted deb-src?http://mirrors.163.com/ubuntu/?precise?main?restricted deb?http://mirrors.163.com/ubuntu/?precise-updates?main?restricted deb-src?http://mirrors.163.com/ubuntu/?precise-updates?main?restricted deb?http://mirrors.163.com/ubuntu/?precise?universe deb-src?http://mirrors.163.com/ubuntu/?precise?universe deb?http://mirrors.163.com/ubuntu/?precise-updates?universe deb-src?http://mirrors.163.com/ubuntu/?precise-updates?universe deb?http://mirrors.163.com/ubuntu/?precise?multiverse deb-src?http://mirrors.163.com/ubuntu/?precise?multiverse deb?http://mirrors.163.com/ubuntu/?precise-updates?multiverse deb-src?http://mirrors.163.com/ubuntu/?precise-updates?multiverse deb?http://mirrors.163.com/ubuntu/?precise-backports?main?restricted?universe?multiverse deb-src?http://mirrors.163.com/ubuntu/?precise-backports?main?restricted?universe?multiverse deb?http://mirrors.163.com/ubuntu/?precise-security?main?restricted deb-src?http://mirrors.163.com/ubuntu/?precise-security?main?restricted deb?http://mirrors.163.com/ubuntu/?precise-security?universe deb-src?http://mirrors.163.com/ubuntu/?precise-security?universe deb?http://mirrors.163.com/ubuntu/?precise-security?multiverse deb-src?http://mirrors.163.com/ubuntu/?precise-security?multiverse deb?http://extras.ubuntu.com/ubuntu?precise?main deb-src?http://extras.ubuntu.com/ubuntu?precise?main
上海交通大學(xué)源:
#上海交通大學(xué)源: deb?http://fpt.sjtu.edu.cn/ubuntu/?dapper?main?multiverse?restricted?universe deb?http://fpt.sjtu.edu.cn/ubuntu/?dapper-updates?main?multiverse?restricted?universe deb?http://fpt.sjtu.edu.cn/ubuntu/?dapper-backports?main?multiverse?restricted?universe deb?http://fpt.sjtu.edu.cn/ubuntu/?dapper-proposed?main?multiverse?restricted?universe deb?http://fpt.sjtu.edu.cn/ubuntu/?dapper-security?main?multiverse?restricted?universe deb?http://fpt.sjtu.edu.cn/ubuntu-cn/?dapper?main?multiverse?restricted?universe
cn99源:
#ubuntu.cn99.com源(推薦): deb?http://ubuntu.cn99.com/ubuntu/?precise?main?restricted?universe?multiverse deb?http://ubuntu.cn99.com/ubuntu/?precise-updates?main?restricted?universe?multiverse deb?http://ubuntu.cn99.com/ubuntu/?precise-security?main?restricted?universe?multiverse deb?http://ubuntu.cn99.com/ubuntu/?precise-backports?main?restricted?universe?multiverse deb?http://ubuntu.cn99.com/ubuntu-cn/?precise?main?restricted?universe?multiverse
我用的是官方的歐洲源,因為它是最全的,而且速度也不慢,下載速度一般在70K/S以上,如果你用官方的源下載速度很慢(更新下載的時候有可能卡在某個包不動了,沒速度了,我就遇到了這個情況。我懷疑是我公司的網(wǎng)絡(luò)問題導(dǎo)致的,所以總是不停的嘗試重新更新,最后都成功了),可以使用其他的源,根據(jù)自己的情況選擇。
然后就要更新源列表了。
#sudo?apt-get?update
2.安裝中文語言包:
點擊右上角齒輪狀的按鈕,或者打開Dash home搜索,找到System Settings->Language Support,然后它會自動檢查更新(等它更新完,我剛開始就直接把它關(guān)掉了,結(jié)果中文輸入法怎么都裝不上),更新完以后,點擊Install/Remove Languages...,選上Chinese(Simplified),點擊Aplly,然后它就會自動下載安裝了(如果下載卡住了,沒速度了,關(guān)了重新打開接著下)。
安裝完了之后發(fā)現(xiàn)“漢語(中國)”還是黑的呢!別急,只需要按住鼠標(biāo)把它拖到最上邊就可以了,OK,Close,ReStart(重啟系統(tǒng))!
3.刪除所有輸入法:
我是怕輸入法太多而引起沖突,而且我也不喜歡有幾個輸入法,看著煩,就增加了這步。
我是手動找到/etc/X11/xinit/xinput.d這個文件夾,刪除前先備份(養(yǎng)成好習(xí)慣),刪除除all_ALL,none以外的所有文件。
4.安裝ibus輸入法框架及漢語拼音:
打開終端,安裝ibus,拼音,五筆
#?sudo?apt-get?install?ibus?ibus-clutter?ibus-gtk?ibus-gtk3?ibus-qt4 #?sudo?apt-get?install?ibus-pinyin #?sudo?apt-get?install?ibus-table-wubi
然后設(shè)置輸入法
ibus-setup
Input Method選項卡中,選中Customize active input methods,Select an input method->Pinyin,Add。
至此中文輸入法就裝完了。
如需轉(zhuǎn)載請注明出處:http://blog.csdn.net/klo220/article/details/18708985