无法更新 Ubuntu 18.04.2

无法更新 Ubuntu 18.04.2

错误信息:

Please install all available updates for your release before upgrading.

截屏:

拒绝更新

内容/etc/update-manager/release-upgrades

# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting behavior, valid options:
#
#  never  - Never check for, or allow upgrading to, a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the supported release that immediately succeeds the
#           currently-running release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that if this option is used and
#           the currently-running release is not itself an LTS release the
#           upgrader will assume prompt was meant to be normal.
Prompt=normal

我已经尝试过显而易见的方法(apt update,,apt upgrade等等apt full-upgrade)。

答案1

问题是以下软件包需要更新:

➜  ~ sudo apt list --upgradable
Listing... Done
opendistro-alerting/stable 1.0.0.0-1 amd64 [upgradable from: 0.9.0.0-1]
opendistro-performance-analyzer/stable 1.0.0.0-1 amd64 [upgradable from: 0.9.0.0-1]
opendistro-security/stable 1.0.0.1-1 amd64 [upgradable from: 0.9.0.0-0]
opendistro-sql/stable 1.0.0.0-1 amd64 [upgradable from: 0.9.0.0-1]
opendistroforelasticsearch/stable 1.0.1-1 amd64 [upgradable from: 0.9.0-1]

不幸的是,这在实践中不可能发生:

➜  ~ sudo apt install opendistro-alerting/stable
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Selected version '1.0.0.0-1' (. stable:stable [amd64]) for 'opendistro-alerting'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 opendistro-alerting : Depends: elasticsearch-oss (= 7.0.1) but 6.7.1 is to be installed
E: Unable to correct problems, you have held broken packages.

我暂时删除了elasticsearch-oss这些opendistro-包裹,然后就可以do-release-upgrade按预期工作了。

答案2

ubuntu 18.04 至 ubuntu 19.04 不是受支持的升级路径

...话虽如此,你可以遵循这个指南:

https://www.linuxbabe.com/ubuntu/upgrade-ubuntu-18-04-to-ubuntu-19-04-directly-from-command-line

指南摘录:

sudo apt update && sudo apt dist-upgrade
sudo apt install update-manager-core
sudo sed -i "s/Prompt=.*/Prompt=normal/g" /etc/update-manager/release-upgrades
sudo sed -i 's/bionic/disco/g' /etc/apt/sources.list
sudo sed -i 's/^/#/' /etc/apt/sources.list.d/*.list
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
sudo apt clean

相关内容