TL;DR This guide shows how to run the x86_64 Linux RAR binary on arm64 using QEMU user-mode or FEX¹, and compares their performance. If you do not want to read further, simply install either of them via your package manager and then run the script included with this gist, to automatically download, configure and install RAR.
¹ FEX only adds about 13% overhead.
RAR is a strong archiving option on Linux when you need features other formats do not provide, such as built‑in recovery records, archive‑level deduplication, robust multi‑volume handling, advanced filters, archive content search & manipulation, strong encryption, etc. [Full comparison with other Linux archivers]
Unfortunately there is currently no native arm64 Linux build of RAR, so the only practical way to run it on an arm64 system is to execute the official x86_64 binary through an emulation or translation layer. Below are two approaches: running RAR under QEMU user‑mode and running it under FEX. QEMU user‑mode is designed to run many different CPU architectures, so it prioritizes flexibility. FEX is built specifically for running x86‑64 apps on ARM64, so it can optimize heavily for that one job and run them much faster.
After setting these up, I ran a series of benchmarks to estimate the performance impact of each method compared to a hypothetical native arm64 Linux RAR binary. FEX appears to be only about 13% slower than native performance for this type of workload, while QEMU was a little over twice as slow (~2.1×). That said, QEMU has been around longer, is more battle‑tested and is available on more distros out of the box, so I think it is worth listing both approaches despite FEX being more performant.
RAR is dynamically linked, so we need both the binary and a minimal x86_64 runtime environment. The included runtime comes from Debian 11 (Bullseye) because its glibc version is stable and broadly compatible with RAR. Newer Debian releases are not required and may introduce unnecessary incompatibilities. I have included a script with this gist (below) to fetch and install RAR and the runtime libraries. Alternatively here are the manual steps, should you prefer.
- Fetch and Install the RAR binary (version 7.12 is the latest version as of 2025-12-28)
wget https://www.rarlab.com/rar/rarlinux-x64-712.tar.gz
tar xf rarlinux-x64-712.tar.gz
sudo install -Dm755 rar/rar /usr/local/lib/rar-x64/bin/rar
- Install your RAR license file (you should already have this locally)
sudo install -m644 rarreg.key /usr/local/etc/rarreg.key
- Fetch x86_64 runtime packages
wget https://ftp.debian.org/debian/pool/main/g/glibc/libc6_2.31-13+deb11u11_amd64.deb \
https://ftp.debian.org/debian/pool/main/g/gcc-10/libgcc-s1_10.2.1-6_amd64.deb \
https://ftp.debian.org/debian/pool/main/g/gcc-10/libstdc++6_10.2.1-6_amd64.deb
- Extract files to a staging directory (requires
arfrom GNU Binutils)
mkdir rar-libs-x64
for d in lib*amd64.deb; do
ar p $d data.tar.xz | tar xCJ rar-libs-x64
done
- Fix up one symlink to make it relative
ln -fs ../lib/x86_64-linux-gnu/ld-2.31.so rar-libs-x64/lib64/ld-linux-x86-64.so.2
- Install the required x86_64 runtime libraries
cd rar-libs-x64
sudo cpio -pLdR0:0 /usr/local/lib/rar-x64 <<-EOF
lib64/ld-linux-x86-64.so.2
lib/x86_64-linux-gnu/libc.so.6
lib/x86_64-linux-gnu/libdl.so.2
lib/x86_64-linux-gnu/libgcc_s.so.1
lib/x86_64-linux-gnu/libm.so.6
lib/x86_64-linux-gnu/libpthread.so.0
lib/x86_64-linux-gnu/librt.so.1
usr/lib/x86_64-linux-gnu/libstdc++.so.6
EOF
QEMU user‑mode runs individual binaries from one CPU architecture on another by translating instructions and emulating system calls. It aims for broad compatibility rather than maximum performance.
- Install QEMU user-mode
sudo apt update
sudo apt install qemu-user-static
- Create a launcher (the bundled script can also do this for you)
printf '%s\n' '#!/bin/sh' 'exec qemu-x86_64-static -L /usr/local/lib/rar-x64 /usr/local/lib/rar-x64/bin/rar "$@"' | \
sudo tee /usr/local/bin/rar >/dev/null
sudo chmod +x /usr/local/bin/rar
- Test
rar -?
FEX also runs x86‑64 Linux binaries on ARM64, but uses a modern JIT, syscall translation, and aggressive library call forwarding to achieve higher performance.
- Install FEX
sudo apt install software-properties-common
sudo add-apt-repository ppa:fex-emu/fex
sudo apt update
sudo apt install fex-emu-armv8.0
Note: There are alternative packages to fex-emu-armv8.0, which might perform better if you have the hardware to support them. Below are some examples, but if you’re unsure, fex-emu-armv8.0 should work on all hardware and is the safe option.
| Device / SoC | ARM Architecture Level | FEX Package |
|---|---|---|
| Raspberry Pi 5 | ARMv8.2 | fex-emu-armv8.2 |
| Ampere Altra | ARMv8.2 | fex-emu-armv8.2 |
| Apple Silicon | ARMv8.4 | fex-emu-armv8.4 |
| Qualcomm Snapdragon | ARMv8.4 | fex-emu-armv8.4 |
- Create a launcher (the bundled script can also do this for you)
printf '%s\n' '#!/bin/sh' 'export FEX_ROOTFS=/usr/local/lib/rar-x64' 'exec FEX /usr/local/lib/rar-x64/bin/rar "$@"' | \
sudo tee /usr/local/bin/rar >/dev/null
sudo chmod +x /usr/local/bin/rar
- Test
rar -?
I performed the following on an Apple M1 MacBook using the same (725 MB) file as test data. To estimate the overhead of QEMU and FEX, I first measured native RAR compressing this file on macOS arm64 (≈ 28 seconds). I then measured the general slowdown when running Linux arm64 inside Parallels (a virtual machine that lets you run Linux under macOS).
Because RAR doesn't exist for Linux arm64, I used 7‑Zip as a stand‑in since it performs similar compression and runs natively on both macOS arm64 and Linux arm64 (both tools are CPU‑bound and use broadly comparable algorithms). 7‑Zip on Linux arm64 took ~40% longer than on macOS arm64, so I scaled the native macOS RAR time accordingly: 28 s × 1.4 ≈ 39 seconds.
I then compared that estimate to the actual compression times of the official x86_64 RAR binary under QEMU user‑mode and FEX. The results are summarised below.
| Method | Measured Time | Overhead (Estimate) |
|---|---|---|
| QEMU user‑mode | 83s | ~2.1× slower |
| FEX | 44s | ~13% slower |
The overhead values show how much slower each method is compared to the estimated performance of a native arm64 Linux RAR binary. QEMU is significantly slower for this workload, while FEX comes much closer to native performance.
Note: I also tested Linux x86_64 7‑Zip using both QEMU and FEX and compared those to Linux arm64 7-Zip. Those results closely matched the overhead patterns above, which gives me confidence that the FEX/QEMU overheads are representative for this type of workload.