当前位置: 首页>>技术教程>>正文


分发升级问题“未找到新版本”

,

问题描述

我正在使用 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

这可能是什么问题?

最佳答案

要在服务器或系统上从 Ubuntu 11.10 或 Ubuntu 10.04 LTS 升级:如果尚未安装 update-manager-core 软件包,请安装它;使用命令 sudo do-release-upgrade -d 启动升级工具;并按照 on-screen 说明进行操作。请注意,服务器升级现在更加强大,并且将利用 GNU 屏幕并自动 re-attach 以防万一。掉线问题。

次佳答案

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

Prompt=lts

如果您当前使用的版本不是 LTS 版本,则会导致升级失败。

解决方案:

Prompt=lts 更改为 Prompt=normal 并保存更改

执行所需的升级,直到安装 LTS 版本。

然后改回Prompt=lts

完毕。

第三种答案

一种可能的原因是发布可用的图章文件不正确地挂起。以下解决了这个问题:

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

这个文件可以安全删除,因为它会在下次运行 motd 脚本时重新生成(如果合适的话)。


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

第四种答案

如果 apt 配置为使用代理并且代理无法正常工作,也会发生这种情况。在我的情况下,文件 /etc/apt/apt.conf.d/01proxy 包含该行

Acquire::http::Proxy "http://proxy.local:9999";

并且服务器 proxy.local 没有响应。删除此行修复了图形和终端更新工具的“未找到新版本”问题。

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/11947.html,未经允许,请勿转载。