Ubuntu 11.10升級到12.04

來源:互聯網
上載者:User
1. 前言

現在的最新版本已經是13.04了,不過一則12.04是所謂的LTS,二來系統是用來做最終示範的,還是保守一點好。另外相信升級的過程都是一樣的

2. 步驟

Linux 升級異常簡單:一個button或一條命令就夠了。之前在GUI裡,點一下“升級”按鈕就行了。現在只能遠程ssh到遠端機器,用console更自然一些(雖然也可以調出software center之類的)

升級命令: do-release-upgrade

3. 過程3.1 問題

不出問題就不叫linux了:)

An unresolvable problem occurred while calculating the upgrade: E:Unable to correct problems, you have held broken packages. This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu"

基本上,應該是已有的11.10版本out of date,和新的(在那之後更新過的)11.10版本有了衝突。這可以從日誌/var/log/dist-upgrade/apt.log中看到,有很多held back的packages. 如果做apt-get -u upgrade,對應的有很多kept back 的cases.

3.2 Solution

sudo apt-get update sudo apt-get dist-upgrade
sudo apt-get --purge autoremovesudo apt-get autocleansudo apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }')

from

http://askubuntu.com/questions/202730/how-to-fix-the-unable-to-calculate-upgrade-issue-when-upgrading-from-12-04-to

另外同樣的問題:Upgrade to 12.04 Failed due to held back packages

註:儘管都提到要先刪除ppa packages (e.g. using ppa-purge or from SoftwareCenter),我沒有刪也沒有問題---可能本來就從來沒裝過

4. 其他4.1 log files

The following logs are related to apt upgrades:

/var/log/apt/history.log/var/log/apt/term.log/var/log/dpkg.log

For dist-upgrade, it's

/var/log/dist-upgrade/[apt.log | main.log]

4.2 Advanced Packaging Tools (APT)

這個題目足夠單獨成章甚至系列了。只列幾個連結

APT HOWTO (Obsolete Documentation)  雖說“到期了”但我發現還是很有用。大量詳盡的例子把很多用法解釋的很清楚。至少入門是很好的

DebianPackageManagement - Debian Wiki

基本上,目前理解的階層是:dpkg-deb---> dpkg--->[Apt | apt-get | aptitude CLI mode] ---> [Synaptic | adept | aptitude console mode (ncurses)]

4.3 Other tips

Run Synaptic from command line

Do NOT run GUI apps with sudo. Instead run:
gksudo synaptic

Sudo doesn't setup the environment correctly for GUI apps. The equivelant in KDE is kdesudo

How to keep processes running after ending ssh session?

Use GNU Screen (not maintained anymore), ormore advanced
tmux

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.