diff --git a/advanced/rosetta.md b/advanced/rosetta.md index 35dcbee..f53dfe4 100644 --- a/advanced/rosetta.md +++ b/advanced/rosetta.md @@ -48,3 +48,30 @@ 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. + +- [Ubuntu]({% link guides/ubuntu.md %}) +- [Debian]({% link guides/debian.md %}) + +## 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: +``` +sudo apt update +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 +``` + +## Troubleshooting + +Sometimes dependencies might fail to install with unconfigured changes. To troubleshoot this issue: +``` +sudo apt -f install -y +``` +However packages might still fail to install due to not being able to use translation or not allowed to compile through Rossetta. + +One known limitation remains with **Snap Packages** due to each package containing all their dependencies and not being able to make use of the translation. diff --git a/guides/debian.md b/guides/debian.md index f47c22f..f2e7f34 100644 --- a/guides/debian.md +++ b/guides/debian.md @@ -63,11 +63,18 @@ $ sudo apt install binfmt-support Then, follow [this guide]({% link advanced/rosetta.md %}) to install Rosetta. ## Installing x86_64 Multiarch -For Rosetta to work, you will have to enable x86_64 packages. +For Rosetta to work, you will have to enable x86_64 packages, this can be done in one of two ways: using `dpkg`, or manually. +### Via `dpkg`: ``` $ sudo dpkg --add-architecture amd64 $ sudo apt update ``` +### Manually +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 +``` You can now install and run any x86_64 package in the Debian repository with `sudo apt install packagename:amd64`. diff --git a/guides/ubuntu.md b/guides/ubuntu.md index 477c2fc..985ab50 100644 --- a/guides/ubuntu.md +++ b/guides/ubuntu.md @@ -1,6 +1,6 @@ --- layout: default -title: Ubuntu 22.04 +title: Ubuntu parent: Guides --- {: .label .label-green } @@ -40,6 +40,55 @@ $ sudo reboot [Follow the instructions in this page.]({% link guest-support/linux.md %}) +## Installing Rosetta +First install `binfmt-support`. + +``` +$ sudo apt install binfmt-support +``` + +Then, follow [this guide]({% link advanced/rosetta.md %}) to install Rosetta. + +## Installing x86_64 Multiarch +For Rosetta to work, you will have to enable x86_64 packages. +For Ubuntu versions from 24.04 onwards using the package manager `apt`, can be updated by adding the archiectrure to your source list `/etc/apt/sources.list.d/` using the `deb822` format. For example 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 +Architectures: arm64 + +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 +Architectures: arm64 + +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 +``` + +> **⚠️ WARNING: Multi-Arch Hazard on Ubuntu** +> +> Running `sudo dpkg --add-architecture amd64` on Ubuntu assumes that the update +> binary URLs are identical across architectures. **They are not** — Ubuntu’s mirrors use architecture-specific paths. +> If this command breaks apt, make sure architecture-specific repository lines exist for both the `arm64` and `amd64` sources. + ## Troubleshooting ### Cannot boot into installer