Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm just migrating from Ubuntu Linux to Mac, and everything is new and I'm re-learning a lot of stuff.

On Linux I had the excellent apt-get to manage software packages. I googled for an alternative on Mac and found about MacPorts, Fink and Homebrew.

I will use this computer primarily to develop Ruby on Rails applications.

So, what are the differences between them? Which are the upsides and downsides? Which one is best maintained and has more packages?

share|improve this question
2  
I edited your title to make it match your real question. On most Stack Exchange sites question asking for "the best" are frowned upon. –  Loïc Wolff Dec 1 '11 at 17:15
1  
Why do you need any of these won't ruby's gems be sufficient? –  Mark Dec 1 '11 at 17:19
add comment

2 Answers

up vote 36 down vote accepted

Definitely Homebrew. I started with Fink, then switched to MacPorts (happier), then Homebrew (much, much happier). These are my reasons for using each (a pro list if you will):

Fink

  • Apt-based - feel right at home if you come from a Debian-based environment
  • Binary packages - packages are available as binaries so no long compile times. Practically though I've found that the pre-compiled binaries were always outdated and I had to compile stuff for my system anyways
  • Decent selection of packages

MacPorts

  • Biggest selection of packages/ports
  • Generally very up to date
  • Nice variants system that lets you customise the build
  • Easy and intuitive port files

Homebrew

  • Very up to date
  • Maximum leveraging of what comes with OS X. Unlike Fink or MacPorts, it does not require you to build/install ruby and libraries from scratch just to install some small Ruby-based tool.
  • Installs into /usr/local so does not need you to modify PATH anywhere
  • Everything owned by user, so no packages ever need potentially risky root access to install
  • Every installed package is cleanly sandboxed into its own cellar so you don't have stray files all over your system, just symlinks from bin, man, etc.
  • Ridiculously easy to create your own formula files (ie. package descriptors)
  • Since you're from a ruby background, another plus is everything is written in ruby and all forumlas are simple ruby scripts
share|improve this answer
5  
Note that for home-brew you can argue that "Installs into /usr/local " and " leveraging of what comes with OS X" are problems - they are the two main reasons I use another packaging system –  Mark Apr 11 '13 at 20:10
    
Given that /usr/local/bin isn't in the default Mac OS X path, you most certainly do have to modify your PATH—you just only have to do it once, since brew puts in that one place links to all the new bins it installs (except the "keg only's", but that's noise here). –  Terry N Mar 19 at 20:24
add comment

MacPorts

It is more independent of Mac OS X, this means MacPorts will just ignore many of the system libraries and softwares that already available in Mac OS X and pull its own one instead, which could be slower when the utility you install requires some set of large libraries and softwares.

But this kind of choice is safer because the packages you installed are less influenced by Apple's system update/upgrade procedure.


Homebrew

It is more dependent on existing Mac OS X installed packages, so this will speed up the installation of packages and minimize redundant libraries.

But the risk is installed packages might be broken because of Apple's system update/upgrade.

So, these are the two different kind of tradeoff.

Also, Homebrew takes over /usr/local by default, with which some folks don't like this because it somehow conflict with the unix-tradition and might cause problems if you’ve already installed anything there (MySQL, etc.)


Apart from these differences, considering the packages these two can offer, you can check with these two commands if you already have MacPorts/Homebrew installed, which show you the packages they currently provided:

port list | wc -l
brew search | wc -l

And you will find out that MacPorts has much more packages than Homebrew.

(16917 v.s 2298 for now.)

share|improve this answer
    
Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone. –  patrix Apr 21 '13 at 9:14
1  
Thanks for the advice of @patrix, I just edited the answer. –  YaOzI Apr 21 '13 at 14:56
    
+1 thanks for the extra information, seeing the number of packages available is helpful. And welcome to Ask Different! –  Garrett Fogerlie Apr 24 '13 at 13:48
4  
As a remark on the differing number of packages: Homebrew decidedly does not include packages for programming languages which have their own packaging system (rubygems/pip/cpan…) or for software for which an arguably more appropriate OS X installer is available (MacTeX). Also, duplicates and older versions are not in the default repo but includes in alternate tap repos. Compare this to macports, which, eg contains an IPython port for all included Python versions. It is kind of a different philosophy which naturally increases the number of packages in macports. –  Debilski Nov 17 '13 at 12:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.