views:

418

answers:

3

How do I run Linux binaries under Mac OS X?

Googling around I found a couple of emulators but none for running Linux binaries on a Mac. There are quite a few posts about running Mac OS X on Linux and that kind of stuff - but that's the opposite of what I want to do.

Update:

Thanks for all the answers! I am fully aware of MacPorts and Fink or any of the other things; and no, I do not want any of these utilities, and I do not want any of the package managers, I prefer to compile things myself. I also have Parallels and could set up virtual machines and all that jazz...

The only thing I want to do is to find a way to run a binary that I do not have the source code for and has been compiled for Linux, but I do not want to run it under Linux but under Mac OS X. Therefore my question about emulators.

+4  A: 

Set up a virtual machine (I personally use VMWare Fusion) and then install whatever distro of Linux you desire on the virtual machine.

Or, if you have the source to the Linux program, chances are you can recompile it on a Mac and run it natively. If you install Fink or MacPorts, you can install a lot of open source programs without much trouble.

mipadi
I added links to Fink and DarwinPorts because they're usually easier than downloading source and trying to compile it, realizing you need to install something else first, and downloading it and trying to compile it, etc etc etc.
Paul Tomblin
Cool. It's actually MacPorts now, by the way. ;)
mipadi
+1  A: 

If you decide to go the virtualization route, consider also VirtualBox.

Also, if you only need UNIX like command line tools, there is the MacPorts project. This is basically how I set up git on my mac: after having installed MacPorts you just have to run the sudo port install git command to install git on your system.

Gregory Pakosz
+2  A: 

You might have some luck with running Linux executables under Mac OS X using Qemu's User Space Emulator

sigjuice