Cannot update to 19.04 -the essential package 'ubuntu-minimal' could not be located.

April 23, 2019 1.8k views
DigitalOcean Ubuntu 18.04

Hi there; I'm having a problem updating 2 droplets, one from 18.04, the other from 18.10. Note that in the error below, it complains about not being able to find ubuntu-minimal, however, if I try and install it, it says:

"ubuntu-minimal is already the newest version (1.425.1)"

Here's a summary of the output - most of the stuff about "No valid mirror found" seems fairly standard on each update and hasn't been an issue before.

do-release-upgrade

Updating repository information

No valid mirror found

While scanning your repository information no mirror entry for the
upgrade was found. This can happen if you run an internal mirror or
if the mirror information is out of date.

Do you want to rewrite your 'sources.list' file anyway? If you choose
'Yes' here it will update all 'cosmic' to 'disco' entries.
If you select 'No' the upgrade will cancel.


Get:1 http://security.ubuntu.com/ubuntu disco-security InRelease [79.7 kB]
Hit https://repos.sonar.digitalocean.com/apt main InRelease
Get:2 https://deb.nodesource.com/node_8.x disco InRelease [4594 B]
Get:3 http://security.ubuntu.com/ubuntu disco-security/main Sources [712 B]
Get:4 http://security.ubuntu.com/ubuntu disco-security/main amd64 Packages [664 B]
Get:5 http://security.ubuntu.com/ubuntu disco-security/main Translation-en [380 B]
Get:6 http://security.ubuntu.com/ubuntu disco-security/main amd64 c-n-f Metadata [108 B]
Get:7 http://security.ubuntu.com/ubuntu disco-security/restricted amd64 c-n-f Metadata [116 B]
Get:8 http://security.ubuntu.com/ubuntu disco-security/universe amd64 c-n-f Metadata [112 B]
Get:9 http://security.ubuntu.com/ubuntu disco-security/multiverse amd64 c-n-f Metadata [116 B]
Get:10 https://deb.nodesource.com/node_8.x disco/main amd64 Packages [765 B]
Fetched 87.3 kB in 0s (0 B/s)

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done

Invalid package information

After updating your package information, the essential package
'ubuntu-minimal' could not be located. This may be because you have
no official mirrors listed in your software sources, or because of
excessive load on the mirror you are using. See /etc/apt/sources.list
for the current list of configured software sources.
In the case of an overloaded mirror, you may want to try the upgrade
again later.

Restoring original system state
2 comments
4 Answers

Greetings!

Great question. The do-release-upgrade will only upgrade an LTS version to the next LTS release by default. The 19.04 release is not an LTS version. You can read more about it here:

https://help.ubuntu.com/lts/serverguide/installing-upgrading.html.en

You may have better luck with the -d flag, just remember that you need to keep updating regularly if you intend to stay on a non-LTS release and not lose support for security updates. This may mean breaking your configurations from time to time.

Jarland

Nothing to do with LTS or not, I've been upgrading this way since 2014, and -d is for development version. Not recommended.

It appears that Digitalocean is actually blocking its own VPS boxes! Take a look:

https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1825938

*I went ahead and switched my mirror of the Ubuntu archive to mirrors.digitalocean.com and set RELEASEUPGRADERALLOWTHIRDPARTY=1, which just prevents the unknown mirror question from appearing, and ran into the following issue:

2019-04-23 11:34:19,567 DEBUG error from httplib: 'HTTP Error 403: Forbidden'

The disco release file is accessible by other means and given that the release upgrader is just using urlopen to retrieve the Release file I suggest you take this up with digitalocean.

Perhaps they are blocking by user agents.

send: b'HEAD /ubuntu/dists/disco/Release HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: mirrors.digitalocean.com\r\nUser-Agent: Python-urllib/3.6\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 403 Forbidden\r\n'*

Having same problem

  • Got an answer from support:

    "You will need to update the repo sources on your Droplet before you can upgrade to Ubuntu 19.04. Our Mirrors are not yet updated for that Version as it has just been released."

    Right, so you can spin up a 19.04 droplet, but they don't have the repos to support it?!?

    They're normally pretty quick.

    • Having the same issue, but I was able to spin up a fresh 19.04 droplet with no issues. What the heck is going on here? I checked /etc/apt/sources.list and they are exactly the same for 18.10 and 19.04 except for the distro name obviously. My 19.04 droplet is able to update fine, I don't understand why the 18.10 droplet can't.

I think I figured it out - I think there's a bug in the Ubuntu code that's supposed to update the mirrors list that comments it out instead.

While do-release-update was paused at this message:
Third party sources disabled

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.

To continue please press [ENTER]

I went and checked /etc/apt/sources.list and everything except a few security entries from security.ubuntu.com. I uncommented all the references to mirrors.digitalocean.com, changed them from cosmic to disco, then hit [ENTER] at that prompt... and now the upgrade is proceeding.

Have another answer? Share your knowledge.