7

I began by trying to install xubuntu-desktop, and then tried xfce4, and other packages (like GIMP) on a freshly installed Ubuntu Server 20.04 on my Raspberry Pi 4 but apt reported that it couldn't find these packages. This is very similar to another report here: Apt can't find package libasound2-dev 20.04 arm64

I would add a comment to that post, but I don't yet have enough reputation to comment. But I figured it's important enough to share here again and bring up the question:

QUESTION: What could cause some of the files in /var/lib/apt/lists/ to be of zero size?

I suppose if I reset my RPI4 during the first couple minutes of the initial boot (display issues)... Could this cause unattended-upgrades to fail to complete or download package/repo data, for example?

To be clear, I also have all the default repositories enabled in /etc/apt/sources.list:

deb http://ports.ubuntu.com/ubuntu-ports focal main restricted
deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted
deb http://ports.ubuntu.com/ubuntu-ports focal universe
deb http://ports.ubuntu.com/ubuntu-ports focal-updates universe
deb http://ports.ubuntu.com/ubuntu-ports focal multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports focal-security universe
deb http://ports.ubuntu.com/ubuntu-ports focal-security multiverse

Ultimately, when I ran the following (deleting all the lists) and tried again as suggested, I was able to locate all the packages I desired:

sudo apt-get clean
sudo apt-get autoclean
sudo rm -rf /var/lib/apt/lists/
sudo apt update
bc1984adam
  • 73
  • 1
  • 6
  • 1
    Just for posterity, your suggestion fixed the same issue we had on Nvidia Jetpack 5.0.2 release (running on Jetson NX board) that is based on Ubuntu 20.04.5 LTS (kernel 5.10.104-tegra, architecture aarch64). Thank you! – Razvan Grigore Sep 08 '22 at 12:57

1 Answers1

3

Yes, this is an ancient question, but the "got it to work" answer isn't correct.

sudo nano /etc/apt/sources.list

append these to the bottom of the file

deb [arch=arm64] http://ports.ubuntu.com/ focal main multiverse universe

deb [arch=arm64] http://ports.ubuntu.com/ focal-security main multiverse universe

deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main multiverse universe

deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main multiverse universe

Exit and save.

sudo dpkg --print-foreign-architectures

sudo dpkg --add-architecture arm64

sudo dpkg --print-foreign-architectures

You should now see arm64 in your list of foreign architectures

sudo apt-get update

You should see quite a few arm64 entries listed. There will be a few "404 not found" as repos move around. The problem is that many of the development packages for arm64 (notably libx11-dev) are in "ports"

user3450148
  • 253
  • 1
  • 10
  • PORTS@! That explains EVERYTHING. I've had a hell of a time updating to impish. Cannonical publishes a 21.10 impish image for Raspberry Pi Arm64, but all the repositories are broken... except ports. If you use the UI to update, checking the usual sources will break the OS :/ ... all normal distro update instructions are also broken. – Ray Foss Dec 01 '21 at 07:14