How to Fix Hetzner ARM64 VPS Package Updates on Ubuntu 24.04
Real quick one from me on updating a Hetzner VPS with something like apt update. I noticed some weird behaviour today when I wanted to
install sqlite3 on my Hetzner box. I was greeted with the following
message:
1sudo apt install sqlite3
2Reading package lists... Done
3Building dependency tree... Done
4Reading state information... Done
5Suggested packages:
6 sqlite3-doc
7The following NEW packages will be installed:
8 sqlite3
90 upgraded, 1 newly installed, 0 to remove and 35 not upgraded.
10Need to get 140 kB of archives.
11After this operation, 587 kB of additional disk space will be used.
12Err:1 https://mirror.hetzner.com/ubuntu/packages noble/main arm64 sqlite3 arm64 3.45.1-1ubuntu2
13 404 Not Found [IP: 2a01:4ff:ff00::3:3 443]
14E: Failed to fetch https://mirror.hetzner.com/ubuntu/packages/pool/main/s/sqlite3/sqlite3_3.45.1-1ubuntu2_arm64.deb 404 Not Found [IP: 2a01:4ff:ff00::3:3 443]
15E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?So a little searching with Perplexity which surfaced this result from geo.rocks apparently Hetzner are no longer mirroring packages for ARM based systems. Iβm running Ubuntu 24.04.1 LTS on a Hetzner CAX (ARM64) server.
So, backup the existing sources.list file and create a new one.
1cd /etc/apt
2mv sources.list /root/sources.list.backupThen open up the new sources.list.d/ubuntu.sources file.
1nano /etc/apt/sources.list.d/ubuntu.sourcesThen you get a pretty scary looking file.
1## Note, this file is written by cloud-init on first boot of an instance
2## modifications made here will not survive a re-bundle.
3##
4## If you wish to make changes you can:
5## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
6## or do the same in user-data
7## b.) add supplemental sources in /etc/apt/sources.list.d
8## c.) make changes to template file
9## /etc/cloud/templates/sources.list.ubuntu.deb822.tmpl
10##
11
12# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
13# newer versions of the distribution.
14
15## Ubuntu distribution repository
16##
17## The following settings can be adjusted to configure which packages to use from Ubuntu.
18## Mirror your choices (except for URIs and Suites) in the security section below to
19## ensure timely security updates.
20##
21## Types: Append deb-src to enable the fetching of source package.
22## URIs: A URL to the repository (you may add multiple URLs)
23## Suites: The following additional suites can be configured
24## <name>-updates - Major bug fix updates produced after the final release of the
25## distribution.
26## <name>-backports - software from this repository may not have been tested as
27## extensively as that contained in the main release, although it includes
28## newer versions of some applications which may provide useful features.
29## Also, please note that software in backports WILL NOT receive any review
30## or updates from the Ubuntu security team.
31## Components: Aside from main, the following components can be added to the list
32## restricted - Software that may not be under a free license, or protected by patents.
33## universe - Community maintained packages.
34## Software from this repository is only maintained and supported by Canonical
35## for machines with Ubuntu Pro subscriptions. Without Ubuntu Pro, the Ubuntu
36## community provides best-effort security maintenance.
37## multiverse - Community maintained of restricted. Software from this repository is
38## ENTIRELY UNSUPPORTED by the Ubuntu team, and may not be under a free
39## licence. Please satisfy yourself as to your rights to use the software.
40## Also, please note that software in multiverse WILL NOT receive any
41## review or updates from the Ubuntu security team.
42##
43## See the sources.list(5) manual page for further settings.
44Types: deb
45URIs: https://mirror.hetzner.com/ubuntu/packages
46Suites: noble noble-updates noble-backports
47Components: main universe restricted multiverse
48Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
49
50## Ubuntu security updates. Aside from URIs and Suites,
51## this should mirror your choices in the previous section.
52Types: deb
53URIs: https://mirror.hetzner.com/ubuntu/security
54Suites: noble-security
55Components: main universe restricted multiverse
56Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpgEssentially, that last section needs changing from:
1Types: deb
2URIs: https://mirror.hetzner.com/ubuntu/packages
3Suites: noble noble-updates noble-backports
4Components: main universe restricted multiverse
5Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
6
7Types: deb
8URIs: https://mirror.hetzner.com/ubuntu/security
9Suites: noble-security
10Components: main universe restricted multiverse
11Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpgTo:
1Types: deb
2URIs: https://mirror.hetzner.com/ubuntu-ports/packages
3Suites: noble noble-updates noble-backports
4Components: main universe restricted multiverse
5Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
6
7Types: deb
8URIs: https://mirror.hetzner.com/ubuntu-ports/security
9Suites: noble-security
10Components: main universe restricted multiverse
11Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpgThen I can run sudo apt update and sudo apt install sqlite3 without any issues.
So, weβre good to go.
Thanks geo.rocks and Perplexity.
There's a reactions leaderboard you can check out too.
Sign up for the newsletter
Want to keep up to date with what I'm working on?
Join other developers and sign up for the newsletter.
I care about the protection of your data. Read the Privacy Policy for more info.