1. 程式人生 > >【新手推薦】Ubuntu12.04英文版安裝中文語言包及輸入法

【新手推薦】Ubuntu12.04英文版安裝中文語言包及輸入法

在安裝中文語言包和中文輸入法之前,我先配置好了pc-arm的交叉編譯環境和QT,因為我要在qt中使用中文,所以不知道是否應該先把開發環境配置好再安裝輸入法。

1.更新源列表:

ubuntu上的軟體安裝都需要實時聯網,所以在安裝軟體時都應該保持網路暢通。安裝軟體需要獲取網路資源,這些資源的地址都存在/etc/apt/souces.list這個列表檔案裡,網路上的源有很多,下面我列出一些。

官方源:

# 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

臺灣大學源:
#臺灣源(推薦網通使用者使用,電信PING平均響應速度41MS。強烈推薦此源,比較完整,較少出現同步問題):
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

網易源:
#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

上海交通大學源:
#上海交通大學源:
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以上,如果你用官方的源下載速度很慢(更新下載的時候有可能卡在某個包不動了,沒速度了,我就遇到了這個情況。我懷疑是我公司的網路問題導致的,所以總是不停的嘗試重新更新,最後都成功了),可以使用其他的源,根據自己的情況選擇。

然後就要更新源列表了。

#sudo apt-get update

2.安裝中文語言包:

點選右上角齒輪狀的按鈕,或者開啟Dash home搜尋,找到System Settings->Language Support,然後它會自動檢查更新(等它更新完,我剛開始就直接把它關掉了,結果中文輸入法怎麼都裝不上),更新完以後,點選Install/Remove Languages...,選上Chinese(Simplified),點選Aplly,然後它就會自動下載安裝了(如果下載卡住了,沒速度了,關了重新開啟接著下)。

安裝完了之後發現“漢語(中國)”還是黑的呢!別急,只需要按住滑鼠把它拖到最上邊就可以了,OK,Close,ReStart(重啟系統)!

3.刪除所有輸入法:

我是怕輸入法太多而引起衝突,而且我也不喜歡有幾個輸入法,看著煩,就增加了這步。

我是手動找到/etc/X11/xinit/xinput.d這個資料夾,刪除前先備份(養成好習慣),刪除除all_ALLnone以外的所有檔案。

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

然後設定輸入法
ibus-setup

Input Method選項卡中,選中Customize active input methodsSelect an input method->PinyinAdd

至此中文輸入法就裝完了。