Operating systems

Installing development tools with fink

Developers should take note of Fink, a collection of open source programs built for OS X. Vincent Danen explains the basics of working with Fink.

Fink is a collection of open source programs built for OS X. These programs are largely available on Linux, and on Windows via Cygwin. Another similar system for OS X is Mac Ports, which uses a ports system similar to FreeBSD's port system. Fink uses DEB packages and is more similar to Debian's package management style, although the Fink front-end to build the .deb packages is unique and quite robust.

As a result, Fink makes it easy to get development tools on the Mac. With it, you can install server programs like MySQL and Apache, or development tools like Subversion and Git. Fink makes the installation of, and continued upgrading, of these tools extremely simple.

Once Fink is installed, you can obtain a list of all available packages that Fink can provide:

$ fink list | less

As you page through this list, you will quickly realize the huge number of packages that Fink provides, for all kinds of things. Want to use a command-line email client? Fink provides mutt. How about IRC? BitchX and irssi are both available. Need a command-line HTTP client? Take your pick from lynx, elinks, or w3m. In fact, with Fink you can even install the entire KDE4 or GNOME desktops, which will run on OS X under the X11 window system. As of this writing, there are well over 11,000 packages that can be installed via Fink.

Keeping Fink up-to-date is important, and this can easily be done by issuing:

$ sudo fink selfupdate
$ sudo fink update-all

This will first update Fink itself and its information files, then will update any of the already-installed packages to the latest available versions. This is ideal because it gives you a single command to update all of the packages on your system that Fink installed. Also, don't be afraid to install things that already exist on the system; if the OS X-provided version of Ruby or Python is too old, you can install it via Fink and use that version instead.

Since Fink installs everything into the /sw/ directory, simply change the PATH settings in ~/.bashrc or ~/.zshrc to search /sw/ before other directories:

source /sw/bin/init.sh
export PATH="/sw/bin:/sw/sbin:${HOME}/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:

If you don't know where to begin but want to, for instance, install Subversion on your system, you would use:

$ fink apropos svn
Information about 9180 packages read in 1 seconds.
     cvs2svn                     1:2.3.0-2             CVS to SVN/git/bzr/hg repository converter
     cvs2svn-py25                1.5.1-11              Python modules for cvs2svn (Python 2.5)...

From the resulting list, select the package(s) you want to install and use the "install" command:

$ fink install svn

If an up-to-date .deb package is available that meets the requirements of your version of OS X, it will be installed. If not, Fink will download the appropriate source and control files to compile it, then keep the resulting .deb packages stored locally. This way, for instance, if you had previously installed git, then later realized you wanted git-svn, Fink will look for the already-compiled version and install the .deb file that had been created the last time it was compiled.

For Python, Perl, or Ruby developers, Fink is awesome. A number of additional Perl, Python, and Ruby libraries are available via Fink. Instead of having to compile these extras by hand, Fink is on-hand to do the heavy lifting for you.

Many of the applications available on Linux are available via Fink. Sure, using programs under X11 is not quite the same as using something native, but it isn't horrendous either. It is very similar to how Safari feels -- like it is a native piece of Aqua goodness, but Firefox feels out of place by how it works and looks. This is how running programs under X11 will feel... it's a little strange, but given what additional applications you can run on OS X, it's worth the cosmetic differences.


Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years and is a veteran Mac user.


Many development tools, databases, and languages are already Mac native, including, but no limited to: -Java -MySQL -Subversion as well as several GUI clients for SubVersion -Eclipse -Netbeans -Oracle JDeveloper -Oracle SQL Developer and Modeler -Oracle Database Server -JBoss -Tomcat -Apache (if fact, the web server provided with OS X is Apache) -Glashfish -Python ships natively in Mac OSX and can be developed in XCode, Netbeans, and Eclipse -Ruby is supported natively (complete with Cocoa bindings) -Mono/MonoDevelop -Emacs I agree with "ah125i", the article is extremely out of date and inaccurate. All the tools called out in the article are available natively on Mac (many ship with OS X). That said, for the occasion that you cannot find the native Mac version or similar tool on Mac, Fink or any of it's successors are viable options. Be careful though; X11 can cause issues and is known not to play nice on OS X. My recommendation for any hardcore linux development, esp those requiring packaging to .deb or .rpm, setup a virtual machine running the appropriate linux disro. In my experience, if your compiling with gcc++ and targeting linux/bsd, you'll have better luck doing so on the target platform.


Ouch. Fink is out-dated? Someone better tell the developers that. Fink works great... just because there is something newer, doesn?t mean the older is obsolete. Just different. Fink at least is tried and true (and excuse me for not jumping to the cool new kid on the block when what is installed still works). And you're right, a lot of OSS stuff is included with OS X, but it's updated at Apple's pace which is pretty darn slow. I mean, subversion as provided by Apple is 1.6.5; what I have with Fink is 1.6.12. Apple gives me python 2.6.1; Fink gives me python 2.6.5. Want me to go on? I mean, you're entitled to your opinion and chosen tools, after all. Running Linux in a vm is good... I do that (I have one permanent vm running all the time), but a lot of the development stuff I do I want to be cross-platform, so limiting myself to a Linux vm doesn't help much there.

Editor's Picks