Skip to content

Instantly share code, notes, and snippets.

@shvchk
Last active December 26, 2024 04:47
Show Gist options
  • Save shvchk/05ed652ada5a28d076a4d0471c2bb18d to your computer and use it in GitHub Desktop.
Save shvchk/05ed652ada5a28d076a4d0471c2bb18d to your computer and use it in GitHub Desktop.
Update podman to 4.3.1 on Ubuntu 22.04 jammy
#! /usr/bin/env bash
set -euo pipefail
echo 'deb http://archive.ubuntu.com/ubuntu/ lunar main universe' > /etc/apt/sources.list.d/lunar.list
cat > /etc/apt/preferences.d/podman.pref << EOF
Package: podman buildah golang-github-containers-common libsubid4 netavark
Pin: release n=lunar
Pin-Priority: 990
Package: *
Pin: release n=lunar
Pin-Priority: -10
EOF
apt update
apt install buildah podman -y
@shvchk
Copy link
Author

shvchk commented Nov 26, 2024

@k3wals but Lunar is EOL and its repos are deleted, aren't they? I've tried Noble and Debian Bookworm repos now, and there are libc6 dependency issues, not sure most of us are that risky to pull libc6 from another distro 😅 Not that I personally need this workaround now anyway, just curious and a bit surprised this was useful for someone )

@k3wals
Copy link

k3wals commented Nov 26, 2024

Before I get to your question, I wanted to add that I also ended up appending crun to the list of packages to update and that worked too. I forked your gist for my own notes.

@shvchk , thankfully, the repos are still present and after you mentioned this I downloaded the debs for safekeeping. This is the only clean way I have found to update podman from 3.4.4 to 4.x on 22.04 and I have searched for hours on this topic. It's sad how complicated this is to update. This is the only method that seemed "clean". Please enlighten me if you have come across a clean way to keep podman fresh on 22.04. I haven't considered compiling from source yet but I'm almost there...

@nickwilliams-zaxiom
Copy link

Before I get to your question, I wanted to add that I also ended up appending crun to the list of packages to update and that worked too. I forked your gist for my own notes.

@shvchk , thankfully, the repos are still present and after you mentioned this I downloaded the debs for safekeeping. This is the only clean way I have found to update podman from 3.4.4 to 4.x on 22.04 and I have searched for hours on this topic. It's sad how complicated this is to update. This is the only method that seemed "clean". Please enlighten me if you have come across a clean way to keep podman fresh on 22.04. I haven't considered compiling from source yet but I'm almost there...

This may have worked three weeks ago, but it doesn't appear to anymore:

Ign:4 http://archive.ubuntu.com/ubuntu lunar InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:7 http://archive.ubuntu.com/ubuntu lunar Release
  404  Not Found [IP: 185.125.190.82 80]
Reading package lists... Done
E: The repository 'http://archive.ubuntu.com/ubuntu lunar Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I haven't been able to find any way around it after about an hour of Googling. Sad. I guess I have to switch back to Docker. Podman is completely broken in Ubuntu 22.04 with a known bug that the Ubuntu maintainers seem unconcerned with fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment