UbuntuHelp:UpgradeProblems
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
UpgradeNotes/UpgradeProblems
About this page
This article is a stub! This page tries to collect and describe possible upgrade problems and solutions. Network issues, unreachable hosts, local conditions and other possible problems preventing the Ubuntu distribution upgrade procedure will be addressed. Please help expanding this documentation if you find more information, solutions or workarounds for upgrading Ubuntu. This page will not deal with application bugs. If the issue is related to bugs in the package manager, upgrade manager or other software, please Report the Problem. Be aware that some of the informations here are quite technical. If you're unsure about something, please don't hesitate to ask for help on the forums instead of accidentally breaking your Ubuntu installation!
Cannot connect to host: Fetching updates fails
Affected versions (reported):
- Ubuntu Gutsy 7.10
Symptoms:
- Upgrade-Manager hangs during the "Fetching updates" step.
-
sudo do-release-upgrade
suddenly stops while trying to connect to a repository.
Cause:
The repository from which you are trying to download upgrades from is unreachable.
When upgrading to a new distribution release, the update manager will try to download and add the address of a local download mirror in /etc/apt/sources.list.d/prerequists-sources.list
. Sometimes this procedure may fail and add an invalid address, or the mirror might be unreachable due to network issues between you and the host.
Correcting the before mentioned file will not help, as it will just be re-created at next upgrade attempt.
Example:
Helge lives in Denmark, but due to local network issues the Danish software mirror dk.archive.ubuntu.com does not work as opposed to the global mirror, archive.ubuntu.com, which works fine.
Workaround:
As a temporary solution, you can force Ubuntu to make requests for the bad host be directed to the good one, e.g. from dk.archive.ubuntu.com to archive.ubuntu.com. This will be based on the IP address of the good host.
1) Obtain the IP address of the good host (in this example we use archive.ubuntu.com):
nslookup archive.ubuntu.comOutput (example):
Name: archive.ubuntu.com Address: 91.189.88.46 Name: archive.ubuntu.com Address: 91.189.88.31 Name: archive.ubuntu.com Address: 91.189.88.45
You can use either of the three IP addresses in the example.
2) Add an entry in /etc/hosts
Open /etc/hosts
in a text-editor (you'll need root privileges).
91.189.88.46 dk.archive.ubuntu.com
This tells Ubuntu that dk.archive.ubuntu.com have the IP that really belongs to archive.ubuntu.com, thus faking connections for dk.archive.ubuntu.com to instead go to archive.ubuntu.com.
Unable to resolve host yourhost
Affected versions (reported):
- Ubuntu Gutsy 7.10
Symptoms:
- Error message in terminal:
unable to resolve host yourhost
or freezing sudo apps in Gnome
Cause: If you upgrade from Ubuntu 7.10 to 8.04 it is impossible to run any application which needs root rights. This is propably because of some fake sudo problems. Workaround:
- As a temporary solution, You could go to:
System > Administration > Network
- Unlock the widow with your user password
- Go to the tab
Host
- Edit the second part of the the first line
127.0.0.1
by replacing the host namelocalhost
by your host name (eg. yourhost)
Based on JP NYC: [1]