Monday, December 5, 2011

Where can I find my LInux software on my Mac

So you have made the switch from Linux to Mac OSX and you realize that owning a Mac is not just about cool software it is about some of the greatest hardware you will ever use. Things like back-lit keyboards, soft flat keys, and the general touch and feel is not something you can find in the PC world. Oh and the high-res glossy screen is wonderful. Yes, Apple is a furniture company and yes OSX is a prison, but it is the NICEST prison you will ever be in. Another point of full disclosure, I am not an Apple fan boy and I am not pro Apple (as noted that I used Linux as day to day OS for 6 years), I am just anti-Windows.

One of the first questions you will ask yourself after you convert to OSX is where are all of the neat programs and tools we were used to in the Linux world. I never realized how many of them I used on a daily basis and how many of them I took for granted. What I have found is:

1) Not all Linux tools are available natively on OSX
2) There is no native apt-get like solution for OSX
3) Not all tools have a native OSX binary versions that you can download
4) You have to have xcode installed in order to get gcc and glibc to even try building the code form source
5) A lot of source code will not easily compile on OSX and if it does, you find yourself in dependency hell really fast

There are a few solutions that help ease a lot of this pain for us. One is called Homebrew ( and another is Mac Ports ( I prefer Homebrew as it tries to use the native system as much as possible. Mac Ports is more of a Linux subsystem drop in, in the /opt/local directory. Once you have these packages installed, they will work a lot like apt-get or other package management solutions we are used to in Linux. Example:

> brew search minicom
> brew install minicom

The thing to keep in mind is that Homebrew uses /usr/local and Mac Ports use /opt/local by default. If you use Mac Ports and try to compile something that needs a library you installed by Mac Ports you need to make sure you tell ./configure where to find it. Example:
> ./configure -I /opt/local/includes -L/opt/local/libs

Homebrew and Mac Ports will really help ease a lot of the initial pain as you go looking for your favorite tools.

No comments:

Post a Comment