-
Notifications
You must be signed in to change notification settings - Fork 78
Update rosetta.md #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gabefair
wants to merge
16
commits into
utmapp:main
Choose a base branch
from
gabefair:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2a8e47b
Update rosetta.md
gabefair c495fc6
Update rosetta.md
gabefair 228f23e
Update rosetta.md
gabefair e7f0ab5
Update rosetta.md
gabefair 0818df8
Update rosetta.md
gabefair fd3f664
Update rosetta.md
gabefair ef4c661
Update rosetta.md
gabefair 7147570
Update rosetta.md
gabefair 6a8b482
Update rosetta.md
gabefair 3b0d75e
Update rosetta.md
gabefair 41d2819
Merge branch 'utmapp:main' into patch-1
gabefair 5c988b5
Add debian rosetta tips
gabefair bf08fe6
Add ubuntu tips to get Rosetta to work
gabefair ef68a58
Specify ubuntu 24 in apt tips
gabefair fa3b6f7
Move ubuntu and debian rosetta tips
gabefair 4b266a1
Add known limitations of rosetta
gabefair File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,86 @@ 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 | ||
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 | ||
``` | ||
## Configuring the Snap Store | ||
To use the Snap Store you need to register multiple CPU architectures with the kernal, add the `qemu-user` userspace emulator, and confirm `binfmt` integration so the kernal can transparently hand `amd64` binaries to the rosetta emulator. | ||
|
||
``` | ||
sudo apt install qemu-user-static binfmt-support | ||
sudo dpkg --add-architecture amd64 | ||
sudo apt update | ||
``` | ||
Now you are ready to install the amd64 install compilers | ||
``` | ||
sudo apt install libc6:amd64 libstdc++6:amd64 | ||
``` | ||
Check if the `dpkg` command is setup to use amd64 | ||
``` | ||
dpkg --print-foreign-architectures | ||
``` | ||
Now install `snapd` and refresh the Snap Store | ||
``` | ||
sudo systemctl restart snapd | ||
sudo snap refresh | ||
``` | ||
Snap is now installed and able to install both binaries targeting either ARM or x64 architectures. Snap will use ARM64 by default, unless AMD64 is specfied as follows: | ||
``` | ||
UBUNTU_STORE_ARCH=amd64 snap download <snapname> | ||
``` | ||
To verify the architecture of installed snaps: | ||
``` | ||
snap list --all | ||
``` | ||
|
||
> **⚠️ 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. | ||
|
||
## 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 | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need qemu-user? Rosetta should provide the emulation.