Friday, November 22, 2024

unix – The best way to execute x86_64 binaries in Linux VM with Rosetta 2

Because of Apple’s Virtualization framework it’s potential to make use of Rosetta 2 inside a Linux VM to run x86_64 purposes.

All of the movies and assets I’ve discovered on-line solely clarify the best way to set up x86 purposes utilizing the apt bundle supervisor by appending :amd64 to the appliance identify.

For instance:

sudo apt set up libx11-6:amd64

You additionally want so as to add the amd64 apt repositories akin to described within the Github repository macOS-Linux-VM-with-Rosetta.

However I am questioning, and I have never discovered a solution but, the best way to execute x86_64 binaries that I’ve manually downloaded someplace or compiled alone, not by means of the apt registry.

I am utilizing Parallels 20.1.1 on an M1 Mac Professional working macOS 15.0.1, I’ve created a Ubuntu 22.04.2 VM with the Parallels Rosetta setting enabled.

I’ve additionally enabled Rosetta in my VM utilizing the script supplied by Parallels as described in Utilizing Rosetta to run x86-64 Docker Containers and Binaries in Linux digital machines with Parallels Desktop.

$ sudo ./rosetta_x86_sources.sh allow
$ sudo apt replace 

However after I execute a x86 binary inside this VM I get an error indicating that I am working the fallacious platform.

can not execute binary file: Exec format error

how can I execute x86_64 binaries on a Linux VM with Rosetta 2?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles