Can't update Ubuntu 18.04.2

5,581

Solution 1

The problem was that the following packages were due to be updated:

➜  ~ 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]

Unfortunately, this could not happen in practice:

➜  ~ 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.

I temporarily removed elasticsearch-oss and the opendistro- packages, and then do-release-upgrade worked as expected.

Solution 2

ubuntu 18.04 to ubuntu 19.04 is not a suported upgrade path

...that being said you can follow this guide:

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

extract from the guide :

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
Share:
5,581

Related videos on Youtube

Adam Williams
Author by

Adam Williams

Updated on September 18, 2022

Comments

  • Adam Williams
    Adam Williams over 1 year

    Error message:

    Please install all available updates for your release before upgrading.
    

    Screenshot:

    Refusal to update

    Contents of /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
    

    I've tried the obvious (apt update, apt upgrade, apt full-upgrade etc).

    • Thomas Ward
      Thomas Ward almost 5 years
      Try sudo apt update && sudo apt dist-upgrade
    • Adam Williams
      Adam Williams almost 5 years
      @ThomasWard Thanks, I tried that though. The latter yields 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
  • Kulfy
    Kulfy almost 5 years
    Editing sources.list isn't recommended unless you know what you are doing. See askubuntu.com/q/1061450/816190
  • Adam Williams
    Adam Williams almost 5 years
    I want to update to 18.10
  • Adam Williams
    Adam Williams almost 5 years
    I want to update to 19.04 after I update to 18.10.
  • tatsu
    tatsu almost 5 years
    just follow the above guide for infinite profit. you're hurting yourself and I don't understand why.
  • user535733
    user535733 almost 5 years
    Well done! +1 for discovering apt list --upgradable. If I could give you a second +1 for the very sensible action of uninstalling the conflicting packages, I would.