在联想笔记本电脑上,我想从Ubuntu 18.04到Ubuntu 18.10(虎皮鹦鹉)。
当我在更新管理器上选择升级时,对话框消失并且没有任何反应。升级没有开始。
注意:今天早上我在另一台笔记本电脑上执行了相同的操作,Ubuntu 成功升级。
do-release-upgrade
升级失败并抛出此错误:
Please install all available updates for your release before upgrading.
我该怎么做才能成功升级系统?
答案1
允许从 LTS 升级到非 LTS 版本(20.04 到 20.10、18.04 到 18.10)
在 20.04 上,他们为失败添加了更清晰的信息sudo do-release-upgrade
:
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.
以前,例如从 18.04 到 18.10,它有时只是给出一个不清楚的错误消息,正如 OP 所报告的:
Please install all available updates for your release before upgrading
解决这两个问题的方法是:
software-properties-gtk
或者通过 Windows 快捷键访问它,其名称为:
软件与更新
然后:
- “更新”标签
- “通知我新的 Ubuntu 版本”下拉菜单
- “对于任何新版本”
然后像往常一样:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo do-release-upgrade
从 22.04 开始,为了使上述某些功能正常工作,您可能还需要解决 ZFS 空间不足的问题,而 Ubuntu 根本拒绝修复这个问题,这太累人了:启动池空间不足,无法再运行更新
zfs list -t snapshot -r | grep auto | cut -f1 -d' ' | xargs -n 1 sudo zfs destroy
如果没有该For any new version
设置,则无法找到新版本:
No new release found.
由于某种原因,apt-get
错过了一次升级,我得到了:
Please install all available updates for your release before upgrading."
仅apt
起作用。
19.10 至 20.04:手动安装所有未自动升级的软件包
我遇到了这个当尝试从 19.10 升级到 20.04 时出现相同的Please install all available updates for your release before upgrading
错误消息,因此我也会在这里为 Google 员工提供解决方案。
当我尝试通常的方法时:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo do-release-upgrade
sudo apt upgrade
告诉我:
The following packages have been kept back:
libomp-dev
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
然后do-release-upgrade
出现Please install all available updates for your release before upgrading.
错误。
解决方案是手动安装libomp-dev
:
sudo apt install libomp-dev
这给了我一些冲突解决方案,我选择了其中一个,然后就do-release-upgrade
开始工作了!
sudo apt upgrade libomp-dev
没有起作用,只apt install
起作用,upgrade
失败了:
The following packages have unmet dependencies:
libomp-dev : Depends: libomp-9-dev (>= 9~) but it is not going to be installed
E: Broken packages
do-release-upgrade -d
启用开发版本,这通常不是你想要的
我建议不要这样做,do-release-upgrade -d
除非你真的知道自己在做什么,因为升级到不稳定的开发版本,这不是大多数用户想要的。
ISO 发布后几天/几周才可以升级
另请注意,升级并非与 18.10 磁盘发布的时间完全相同,似乎您必须等待几天,直到 18.10.1 发布后才能升级。
如果您sudo do-release-upgrade
在此之前尝试,您仍然可以获得:
No new release found.
“.0” ISO 通常也存在更多错误。例如,当我尝试 21.04 ISO 时,UI 会随机崩溃,这可能是由于 Wayland 造成的:全新安装 21.04 后,Ubuntu UI 屏幕图像在使用过程中随机冻结,怀疑是 Wayland 或 Nouveau 的问题因此,除非您想帮忙调试它,否则最好等待 .1 出来。
答案2
我从 18.10 升级到 19.04 时遇到了同样的问题。就我而言,原因是我有一些标记为 的包kept back
。在这种情况下,它们与 MSSQL 相关。
szymon@szymon-Lenovo-Z580:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libodbc1 unixodbc
0 to upgrade, 0 to newly install, 0 to remove and 2 not to upgrade.
我只是将它们与它们的依赖项一起删除:
szymon@szymon-Lenovo-Z580:~$ sudo apt remove unixodbc libodbc1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
odbcinst odbcinst1debian2
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
freetds-bin libodbc1 msodbcsql17 mssql-tools unixodbc
然后下面的命令序列使我成功升级:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo do-release-upgrade
编辑:后来我发现Michael 的详细回答类似的问题可能有助于实现相同的目标。
答案3
安装所有更新,然后通过终端执行系统升级,这样应该可以工作:
sudo apt-get update && sudo apt-get upgrade
sudo apt dist-upgrade
sudo do-release-upgrade
答案4
通过禁用第三方列表解决了我的问题 https://tecadmin.net/resolved-please-install-all-available-updates-for-your-release-before-upgrading/
cd /etc/apt/sources.list.d
for i in *.list; do mv ${i} ${i}.disabled; done
apt clean
apt autoclean
sudo do-release-upgrade