0

What my problem is

I can't install updates or any new package from ubuntu repositories. The package list seems to only contain already installed packages, e.g.

$ apt-cache policy bash
bash:
  Installed: 5.0-4ubuntu1
  Candidate: 5.0-4ubuntu1
  Version table:
 *** 5.0-4ubuntu1 100
        100 /var/lib/dpkg/status
$ apt search curl
Sorting... Done
Full Text Search... Done
curl/now 7.65.3-1ubuntu3 arm64 [installed,local]
  command line tool for transferring data with URL syntax

libcurl3-gnutls/now 7.65.3-1ubuntu3 arm64 [installed,local]
  easy-to-use client-side URL transfer library (GnuTLS flavour)

libcurl4/now 7.65.3-1ubuntu3 arm64 [installed,local]
  easy-to-use client-side URL transfer library (OpenSSL flavour)

I expected apt-cache policy to display a line like

500 http://ports.ubuntu.com/ubuntu-ports eoan/main arm64 Packages

like on any other ubuntu. The apt search command should have output a long list of packages.

What I did before this happened

I downloaded the preinstalled 19.10 image today from http://cdimage.ubuntu.com/releases/eoan/release/ubuntu-19.10-preinstalled-server-arm64+raspi3.img.xz and dded it on a SD card and booted a raspberry pi 4b from it. The device boots fine. I then wanted to do a dist-upgrade as I normally do after installing an ubuntu system from some image.

apt update seems to have run without any serious issue:

$ sudo apt update
Hit:1 http://ports.ubuntu.com/ubuntu-ports eoan InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports eoan-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports eoan-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports eoan-security InRelease
WARNING:root:cannot read /var/lib/command-not-found/commands.db.metadata: Expecting value: line 1 column 1 (char 0)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

That warning seemed a bit strange, but went away when running apt update again.

Immediately after that I ran

$ sudo apt 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.

That was the first indication that something was strange as normally those images are not completely up to date.

What I tried to solve this

I tried these commands a couple times, rebooted the system after doing a couple other changes (setting hostname, adding kernel parameters to bootloader). Still no packages.

I then added another repository to apt which works completely fine. I can find packages in it and install them. No problem at all.

But trying to install the packages nfs-common and docker.io, those could not be found.

I looked for the package list files in /var/cache/apt/list but could not find that directory. On a working 18.04 armhf system that directory is missing, too, so this seems to be ok. There is instead a file /var/cache/apt/pkgcache.bin which I tried to remove (sudo rm /var/cache/apt/pkgcache.bin), but after apt update the problem remains.

Further useful information

My /etc/apt/sources.list (comments removed for brevity):

deb http://ports.ubuntu.com/ubuntu-ports eoan main restricted
deb http://ports.ubuntu.com/ubuntu-ports eoan-updates main restricted

deb http://ports.ubuntu.com/ubuntu-ports eoan universe
deb http://ports.ubuntu.com/ubuntu-ports eoan-updates universe

deb http://ports.ubuntu.com/ubuntu-ports eoan multiverse
deb http://ports.ubuntu.com/ubuntu-ports eoan-updates multiverse

deb http://ports.ubuntu.com/ubuntu-ports eoan-backports main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports eoan-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports eoan-security universe
deb http://ports.ubuntu.com/ubuntu-ports eoan-security multiverse

/etc/apt/sources.list.d is empty. It is the original file from the image, I didn't modify it.

I am at a loss here, out of ideas how to debug this further. Does anyone of you have an idea what went wrong on that system?

1
  • ls -al /etc/apt | grep source updating your package source is interrupted.
    – nobody
    Commented Nov 3, 2019 at 9:01

1 Answer 1

1

Not sure why this happened, but I had exactly the same problem. The solution for me was to comment the universe/multiverse entries out of /etc/apt/sources.list and then run apt-get purge and apt-get clean. After than, I ran apt-add-repository universe and apt-add-repository multiverse, and that did the trick.

1
  • Thank you a lot! This did the trick. I still don't know what exactly happened, but after commenting all ubuntu mirror lines from /etc/apt/sources.list, doing apt-get purge and apt-get clean and apt-get update (not sure which of those are really relevant) I still had the same problem. But after adding those lines again and doing apt-get update I got a bunch of updates to install. Commented Nov 3, 2019 at 11:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .