Skip to content
52 changes: 52 additions & 0 deletions advanced/rosetta.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,55 @@ The `magic` parameter describes the first 20 bytes of the ELF header for x86_64

## Installing Shared Libraries
In order to run x86_64 executables, you still need to install shared libraries for x86_64. The instructions vary for different distros but usually involve enabling "multiarch" or "multilib" support.

For example for distros using `apt` the package manager can be updated by adding the archiectrure to your source list `/etc/apt/sources.list`. For example on Debian:

```
deb [ arch=arm64,amd64 ] http://deb.debian.org/debian/ bookworm main contrib non-free-firmware non-free
```
and on Ubuntu:
```
Types: deb
URIs: http://ports.ubuntu.com/ubuntu-ports/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: https://security.ports.ubuntu.com/ubuntu-ports/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://us.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Architectures: amd64

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Architectures: amd64
Copy link
Author

@gabefair gabefair Aug 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This absolutely needs to be added to the documentation for the following reasons:

  1. This information (in the context of Rosetta) is not found anywhere else. Not in any blog posts or youtube tutorials.
  2. ChatGPT and Claude both provided wrong urls for this.
  3. The urls are different for arm and amd binaries. The distro maintainers do not make this clear.
  4. Would save hours of debugging time in our users.
  5. Providing a gold copy of the sources file would serve as a reference backup once people start tinkering and mess up their file. Ubuntu does not document or provide a clear ARM template for this file in any of their documentation. (I lost hours trying to figure this stuff out)

```

And lastly, refreshing the package manager:
```
sudo dpkg --add-architecture amd64
sudo apt update
```

## Confirming Success
To test if your system now has binaries avaliable via the package manager you can run the following command to check if both `arm64` and `amd64` are avaiable. For example the 7-zip program:
```
apt list p7zip-full
```
If you need to force install a program, you should also confirm it is an `ELF 64-bit LSB pie executable, x86-64` file.
```
sudo apt install p7zip-full:amd64
file /usr/lib/p7zip/7z
7z b
```