1

I am preparing a Rocky Linux 8.6 system to run Docker Buildx for multi-architecture images. Ideally I'd like to have a host installation of QEMU and binfmt_misc (rather than one based on a Docker image).

On Debian-like systems I could apt-get install -y qemu-user-static. However, the QEMU packages appear to be missing for RHEL 8/CentOS Stream 8/Rocky Linux.

The RedHat knowledge-base likely has a solution at https://access.redhat.com/solutions/5654221 but it's subscription-only.

P.S. I'm basically following https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/#Host-Installation-QEMU

Marcel Stör
  • 191
  • 1
  • 2
  • 8
  • You'll find these packages available in Fedora, which is probably a better analog for Debian/Ubuntu than is CentOS (because RHEL/CentOS focus on enterprise deployments and will often have a more limited package selection). – larsks Aug 19 '22 at 11:39
  • Thanks for your insights. What is a "sustainable" way of adding Fedora packages to the Rocky installation i.e. one that is not likely to cause issues down the road? – Marcel Stör Aug 21 '22 at 07:35
  • I was not suggesting added Fedora packages to Rocky. I was suggesting that you replace Rocky with Fedora. What you are suggesting may be possible, but I would hesitate to recommend it. – larsks Aug 21 '22 at 22:03
  • Oh, I see, thanks for the clarification. I was upgrading this old CentOS 7 system, first to CentOS Stream 8, then to Rocky. – Marcel Stör Aug 22 '22 at 06:12

1 Answers1

1

Install the Fedora 28 qemu-user-static package:

The following instructions will download the Fedora 28 GPG key and RPMs needed to load qemu, then import the GPG key and install the RPMs:

mkdir qemu-rpms; cd qemu-rpms
wget https://src.fedoraproject.org/rpms/fedora-repos/raw/rawhide/f/RPM-GPG-KEY-fedora-28-primary
wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Everything/x86_64/os/Packages/q/qemu-user-static-2.11.1-2.fc28.x86_64.rpm
wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Everything/x86_64/os/Packages/q/qemu-common-2.11.1-2.fc28.x86_64.rpm
wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Everything/x86_64/os/Packages/c/capstone-3.0.4-14.fc28.x86_64.rpm
sudo rpm --import RPM-GPG-KEY-fedora-28-primary
sudo yum remove qemu-kvm-common
sudo yum install *.rpm

when you are done you can safely remote the qemu-rpms folder.

Technically, I don't know if this works on Rocky 8 – but on RHEL8 this definitely works.

fission
  • 3,601
  • 2
  • 21
  • 31
Compholio
  • 111
  • 2