发行版升级问题“未发现新版本”

发行版升级问题“未发现新版本”

我正在使用 Ubuntu 11.04。更新管理器曾经发现新版本“oneiric”,当我使用 ssh 登录时仍然显示此屏幕:

Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-14-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

0 packages can be updated.
0 updates are security updates.

New release 'oneiric' available.
Run 'do-release-upgrade' to upgrade to it.

Last login: Wed Apr 25 16:22:48 2012 from ***

但那时我并没有升级,而是更改了我的 apt 源。现在我无法升级到“oneiric”。do-relase-upgrade显示:

$ sudo do-release-upgrade
Checking for a new ubuntu release
No new release found
$

apt-get dist-upgrade显示:

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$

我可以成功更新我的所有软件包。


source.list的文件内容:

$ cat /etc/apt/sources.list
## See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty main universe restricted multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty main universe restricted multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-security universe main multiverse restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-security universe main multiverse restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-updates universe main multiverse restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-updates universe main multiverse restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-backports universe main multiverse restricted
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-backports universe main multiverse restricted


# deb http://ubuntu.dormforce.net/ubuntu/ lucid main universe restricted multiverse
# deb-src http://ubuntu.dormforce.net/ubuntu/ lucid main universe restricted multiverse
# deb http://ubuntu.dormforce.net/ubuntu/ lucid-security universe main multiverse restricted
# deb-src http://ubuntu.dormforce.net/ubuntu/ lucid-security universe main multiverse restricted
# deb http://ubuntu.dormforce.net/ubuntu/ lucid-updates universe main multiverse restricted
# deb-src http://ubuntu.dormforce.net/ubuntu/ lucid-updates universe main multiverse restricted

# CDROMs are managed through the apt-cdrom tool.
# deb http://archive.canonical.com lucid partner
# deb http://archive.canonical.com lucid-security partner
# deb http://archive.canonical.com lucid-updates partner
# deb-src http://archive.canonical.com lucid partner
# deb-src http://archive.canonical.com lucid-security partner
# deb-src http://archive.canonical.com lucid-updates partner


#medibuntu repo
# deb http://packages.medibuntu.org/ lucid free non-free
# deb-src http://packages.medibuntu.org/ lucid free non-free

# deb http://extras.ubuntu.com/ubuntu maverick main #Third party developers repository
deb http://mirrors.sohu.com/ubuntu/ natty main restricted multiverse universe
deb-src http://mirrors.sohu.com/ubuntu/ natty main universe restricted multiverse #Added by software-properties
deb http://security.ubuntu.com/ubuntu/ natty-security universe main multiverse restricted
deb-src http://mirrors.sohu.com/ubuntu/ natty-security universe main multiverse restricted
deb http://mirrors.sohu.com/ubuntu/ natty-updates universe main multiverse restricted
deb-src http://mirrors.sohu.com/ubuntu/ natty-updates universe main multiverse restricted

/etc/update-manager/meta-release的文件内容:

$ cat /etc/update-manager/meta-release
# default location for the meta-release file

[METARELEASE]
URI = http://changelogs.ubuntu.com/meta-release
URI_LTS = http://changelogs.ubuntu.com/meta-release-lts
URI_UNSTABLE_POSTFIX = -development
URI_PROPOSED_POSTFIX = -proposed

这可能是什么问题?

答案1

查看/etc/update-manager/release-upgrades

Prompt=lts

如果你当前使用的版本是不是一个 LTS 版本。

解决方案:

更改Prompt=ltsPrompt=normal并保存更改

进行必要的升级,直到安装 LTS 版本。

然后改回Prompt=lts

完毕。

答案2

要在服务器或系统上从 Ubuntu 11.10 或 Ubuntu 10.04 LTS 升级:update-manager-core如果尚未安装,请安装该软件包;使用以下命令启动升级工具sudo do-release-upgrade -d;然后按照屏幕上的说明进行操作。请注意,服务器升级现在更加强大,将利用 GNU 屏幕并在出现连接中断等问题时自动重新连接。

答案3

一个可能的原因是可用发行版邮票文件挂起不正确。以下修复了此问题:

sudo rm /var/lib/ubuntu-release-upgrader/release-upgrade-available

该文件可以安全删除,因为如果合适,它将在下次 motd 脚本运行时重新生成。


原因:这个问题在我使用 apt-get distupgrade 完成部分版本升级后于 13.04 中出现。如果 stamp 文件存在/var/lib/ubuntu-release-upgrader/release-upgrade-available并且有新版本可用的消息,则每次登录时都会通过 motd 脚本显示该消息:/etc/update-motd.d/91-release-upgrade/usr/lib/ubuntu-release-upgrader/release-upgrade-motd如果 stamp 为空,则该脚本会调用更新 stamp。有关此问题出现的原因的更多信息,请参阅这些文件。

答案4

就我而言,正在运行的 12.04 不会提供升级到 12.10 的选项。原因是 12.10 与我的视频硬件存在兼容性问题。在我尝试强制升级后,工具告诉了我。

相关内容