折騰ubuntu12.04時碰到的問題及解決方案 1,更新源的操作 以更新為163的源為例,網上的源多的是,可以找適合自己的源 Java代碼 www.2cto.com #網易 Ubuntu deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted www.2cto.com 上面的是163的源 首先 要備份原來的源 Java代碼 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup 然後修改源檔案 Java代碼 sudo gedit /etc/apt/sources.list 刪除裡面的內容,把新的源添加進去 然後執行Java代碼 sudo apt-get update 這個時候可能會出現這樣一錯誤 W: GPG 錯誤:http://ppa.launchpad.net precise Release: 由於沒有公開金鑰,無法驗證下列簽名: NO_PUBKEY 3B22AB97 解決辦法,這個要看他具體報的什麼key Java代碼 www.2cto.com sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B22AB97 如果後邊的是其它的key可以更改為其它key 然後再執行Java代碼 sudo apt-get update 即可 2 把軟體加到ubuntu12.04的launcher上 以下載解壓的firefox為例 解壓出下載的檔案為firefox目錄,把這個目錄移動到Java代碼 /opt/firefox www.2cto.com 再做一個超連結Java代碼 sudo ln -s /opt/firefox/firefox /usr/bin/firefox a 建立一個檔案firefox.desktop Java代碼 [Desktop Entry] Version=15.0.1 Name=Firefox GenericName=Firefox X-GNOME-FullName=Firefox Comment=Firefox Type=Application Categories=Internet Exec=/opt/firefox/firefox TryExec=/opt/firefox/firefox Terminal=false StartupNotify=true Icon=/opt/firefox/icons/mozicon128.png www.2cto.com b.把這個檔案移動到Java代碼 sudo mv firefox.desktop /usr/share/applications 這個裡邊 c.重新啟動firefox在launcher裡就可以看到firefox上多了一個命令lock in launcher