what are the alternatives for running a Mach-O 64-bit binary file on a linux machine?


step 1: am running on a 64 bit linux machine.
(command): uname -a
(result): Linux ****** 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux.

step 2: i checked the file type of the "binary file" i want to run.
(command): file keymaker
(result): keymaker: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>

step 3: i made the "mach-o" file executable by changing file permissions. (command): chmod +x keymaker

step 4: i run the "binary file".
(command): ./keymaker
(result): bash: ./keymaker: cannot execute binary file: Exec format error

step 5: When i searched on stack overflow for a similar problem i found one but it said that:
(Answer): There is currently no working Mach-O loader for Linux.
(Reference): Can I run a binary file that is Mach-O executable i386 on linux?

step 6: i have a "linux version" of an application installed on my linux machine, but i need to run this "keymaker file" to provide me with a "license key".
And i don't want to install a full (4GB +) MAC OS operating system probably in a virtual machine just to run a simple binary file.
I understand this is a MAC OS file but my theory was that since we can use the "wine application" for Windows OS applications on linux, there must be alternatives as well for MAC OS needs.

Show source
| osx   | linux   2017-01-06 12:01 1 Answers

Answers ( 1 )

  1. 2017-01-06 14:01

    The answer referenced in your question is from 2010. Unfortunately, it seems that it is still of actuality.

    The link you gave in comment is a little more interesting because it links to the Darling project that declares

    Darling is a translation layer that allows you to run unmodified macOS binaries on Linux. In its nature, it is similar to the well-known Wine project.

    Wow exactly what you asked! But it looks to still be in early stages and not aimed at end users:

    At this point, does not yet run macOS application with a GUI.

    TL/DR: you should try the Darling project. Whether it is able to start your program is far from sure, but it seems to be your best bet, mainly if your prog does not use a GUI.

◀ Go back