7

I want to execute a program (which I know was written in C++), but I get this error:

zsh: exec format error: ./myProgram

Output of file myProgram:

myProgram: Mach-O i386 executable

My system is a 64-bit Linux. I also tried on a 32-bit Ubuntu VM, but I get:

bash: ./myProgram: cannot execute binary file: Exec format error

Why wasn't I able execute that program? How can I execute it?

2 Answers2

4

You might have luck with Darling:

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

At this point, it is unlikely that Darling will run your favorite OS X application. For more information, review the Project Status. Developers are always welcome to join the project.

http://www.darlinghq.org/

Julian
  • 549
4

You may be able to run it under PureDarwin using VirtualBox.

"Darwin is the Open Source operating system from Apple that forms the basis for Mac OS X, and PureDarwin is a community project to make Darwin more usable (some people think of it as the informal successor to OpenDarwin)."

http://www.puredarwin.org/developers/virtualbox#TOC-Ubuntu-Virtual-Box-4

Julian
  • 549