6 ms·
Homebrew — MacPorts driving you to drink? Try Homebrew
- deleted 17y ago[deleted]
- jnoller 17y agoI can't recommend homebrew enough - I've been burned by macports and fink in the past, and so I had reverted to the time tested "just compile stuff by hand". Homebrew strikes a good balance between the raw, do it yourself approach and something as big and intermingled as macports.
- amock 17y agoWhat problems did you have with MacPorts?
- jnoller 17y agoFrequently, when actually needing to compile other things (outside of macports), Macports would be pulled in "magically" and cause issues (such as gettext and Python-core). Frequent issues debugging strange issues when trying to port install things, etc. Homebrew does just enough to work, and get the job done and attempts to "fit in" with the OS I already have, versus making it's own sandbox off to the side.
- amock 17y agoThe problem with accidentally pulling in libraries seems unavoidable with Homebrew since it uses /usr/local. Is the lack of sandboxing what you think makes it better? This seems like exactly what you should be looking for. While I agree that it would be nice to have seamless integration with the OS, having a completely separate installation helps with things like OS upgrades or when you need to use a different version of a library that is installed by the OS. Does Homebrew do anything to handle that kind of problem?
- jnoller 17y agoIt can use /usr/local - and you can set it up so that /usr/local comes before the rest of your system as you need to. Yes, an entirely self-contained sandbox avoids this, but most of the time, I don't want that. Like I said in a previous comment, most of the time I'd find myself compiling things by hand into /usr/local anyway. Please! Use the system's provided libraries. If I need something newer, I'll brew install it myself. For me homebrew strikes a good balance between "compile it myself, damn it" and Macports/Fink. The formula are easy to hack and update (it's simple), and for the most part it just gets ourt of your way.
- jordibunster 17y agoYou don't have to use /usr/local/
- lutorm 17y agoWhat problems did you have with fink?
- mark_l_watson 17y agoFor years, I have "compiled stuff by hand" of OS X - not a bad approach, but it takes time. If I was just a software developer I would probably run OS X most of the time because I would have my tools built and installed once and no repeat time wasting work. For me, I also write on tech a lot, and sometimes I get some consulting work fitting people's projects to technology stacks. As a result, I have the perfect excuse to try just about everything and installing "everything" is simpler on Linux. If Homebrew develops into a great system in the future, I might boot less to Ubuntu.
- phren0logy 17y agoI just installed homebrew a few weeks ago. Consider me a fan. It's extremely straight-forward, and has almost everything I'm looking for. It's easy to update, and easy to remove packages. I might never boot back into Ubuntu.
- bshep 17y agoI currently use MacPorts... just wondering why I should switch?
- tvon 17y agoFWIW, I was an early Homebrew user and even contributed a few recipes, but I moved back to MacPorts because (and no offense to mxcl, but it's kind of unavoidable) the author seems to do things with little understanding of the underlying system or justification. Taking ownership of /user/local is completely utterly pointless and just plain bad advice. Copy-and-pasting optimization code from the Gentoo wiki is pointless. Binaries and libs are stripped without must justification, which will (did for me anyway) cause problems when compoing against the libs (eg, easy_install-ing anything against homebrew libs caused problems for me). There has also been a lot of FUD spread about at the expense of MacPorts which I think is just low class. The anti-Macports complaints basically amount to "I don't understand this, so I'm going to say it's bad". That said, it's written in ruby, uses github and the homepage is well done, so it will probably be wildly popular.
- rufo 17y agoI've had MacPorts completely explode in my face several times when installing a seemingly innocuous package - some shared library gets replaced due to a requirement, and suddenly every utility I've installed doesn't work. Eventually I got to a point where I only used MacPorts to install ImageMagick and compiled everything else by hand; so far homebrew has felt like a more disciplined version of "compile it yourself". I can't say I've had any problems with compiling Ruby gems against homebrew besides some settings that needed to be overridden in the MySQL gem, so that hasn't been a problem for me. I kind of have mixed feelings about the ownership. So far I've been running it in /usr/local owned by my user and haven't had any problems, but I can see the security argument for not doing it. It doesn't feel any different then compiling your own binaries and leaving them in your home directory, something I've had to do on several hosts I've had in the past. (Also: Snow Leopard doesn't install anything to /usr/local by default, so if you're starting from scratch there's nothing to take ownership of...) Overall, I've rather liked it so far. We'll see if I regret it...
- reynhout 17y agoSo...Homebrew is MacPorts with simplified Portfiles and a smaller dependency graph?
- deleted 17y ago[deleted]
- amock 17y agoThe title here and the quote at the bottom of the page say that it's better than MacPorts but there doesn't seem to be any comparison between them other than that. The only thing I've seen people use to say that it's better is that it's written in Ruby, but that doesn't seem like a big deal. Is there a comparison of the two somewhere? It seems like the problem people have with MacPorts is that it's been around longer so there have been more chances for things to go wrong.
- jeremymcanally 17y agoI hated having to download 800mb of dependencies to install something simple. I already have Perl or lib(whatever); I don't need you to download it and install it. I get the reliability argument (i.e., the only way to guarantee stuff builds right is to manage it yourself), but that's a problem with any platform where you might compile things alongside the package manager. So, let me manage that. I don't need a package manager to argue with me about what I want installed.
- oomkiller 17y agoIn addition to this argument, I think comparing them is almost like comparing apples and oranges. They both have their place on your system, but Macports is like a "lower gear" than Homebrew, and it takes a ton of time to do anything with it.
- freetard 17y agoA better way to use all those unix tools is to just run Ubuntu in a VM and develop there, or just replace MacOS with Ubuntu entirely.
- vdm 17y agoVagrant makes this a lot easier. http://vagrantup.com/ http://vagrantup.com/
- dlib 17y agoI now use Vagrant for App Engine and it's a breeze to set up. Since the working directory is mounted by the vm textmate works as always. I only have to ssh into the virtual machine to run some python scripts since locally there are some dependencies issues.
- oomkiller 17y agoDid ubuntu suddenly get TextMate support? Also, have they fixed the poor graphics acceleration issues? Didn't think so, go away troll.
- freetard 17y agoThat's cool if you're happy with OS X. It's just that I know many OS X devs who use ubuntu in a VM. I'm personally happy with a full install of Ubuntu and Emacs instead of textmate while others prefer OS X + textmate or emacs or vim or what have you, to each his/her own. I was just stating an alternative, I didn't know that was trolling.
- jodrellblank 17y agoIn a MacOS X package management thread, your solution is "install ubuntu", and you didn't know that was trolling? I'm very suspicious of your story.
- mark_l_watson 17y agoI hear you: TextMate is a great editor, especially when you want to browse through a lot of code. That said, "e" on Windows is fairly TextMate compatible (at least it runs the TextMate plugins). For Ubuntu, GEdit and Emacs are very good. Emacs with Speedbar lets you whip through lots of code quickly. GEdit also provides good plugins and multiple directory code browsing. All that said, I still boot OS X for specific apps (TexShop, OmniGraffle mostly). Anyway, it is a free world, and certainly OS X is a great choice for development.
- azm 17y ago<spelling-nazi> s/compliments/complements/ </spelling-nazi> The former changes the meaning of the sentence completely. But otherwise looks great. I would give anything to completely ditch macports.
- intranation 17y agoThere's been lots of in-depth discussion about the pros and cons of MacPorts or Homebrew on HN already: http://news.ycombinator.com/item?id=871341 http://news.ycombinator.com/item?id=871341
- telemachos 17y agoAnd a more recent one (a lot of which ends up focused on /usr/local and sudo): http://news.ycombinator.com/item?id=1095793 http://news.ycombinator.com/item?id=1095793
- t_crayford 17y agoWebsite need formula -> formulae for pluralization.
- jokull 17y agoThink of it as a framework to build things yourself. It's not strictly a replacement for MacPorts.
- whalesalad 17y agoInstalling wget took about 20 seconds... brilliant.
- kylecordes 17y agoAh, but you appreciate wget much more, if you wait through the amount of time it takes MacPorts to provide it ;-)
- zephjc 17y agothis is #1 what drives me nuts about macports: $ port deps clojure-contrib Full Name: clojure-contrib @1.1.0 Build Dependencies: clojure Fetch Dependencies: git-core $ port deps git-core Full Name: git-core @1.7.0.2+doc Runtime Dependencies: rsync, perl5, p5-error Library Dependencies: curl, zlib, openssl, expat, libiconv with no possibility of skipping dependencies
- apinstein 17y agoWhy don't you just edit the port to add a variant that lets you opt-out of those dependencies? Poor package management isn't the fault of MacPorts; a Homebrew port could be just as poorly designed. The "variants" infrastructure of MacPorts is one of my favorite parts of MacPorts, it definitely makes it easier to manage interdependencies IMHO.
- evgen 17y agoTruth. Anyone capable of maintaining a homebrew setup has Sufficient skills to spend five minutes scanning the macports guide and tweaking the port files. OTOH, building clojure is te leas of the parents problems; he is in for anworld of painful surprise when he sees how screwed up packaging is. Have a clojure app? Include your own copy of clojure and clojure-contrib. Have a clojure editing mode? Do the same. Have a blog entry that mentions clojure? I think you need to download and squirrel away the jar files in those cases as well... I ended up creating my own branch of the port tree for clojure bits just because of all the patching needed to avoid this "let me grab a copy of clojure for you" behavior.
- zephjc 17y agoIndeed. After looking at various package/dep schemes for clojure, I just gave up and created my own application and library templates and copy files around - at least the jar files are small enough that it doesn't really matter.
- phr 17y agoWhat I'd like to try sometime is NIX ( http://nixos.org/nix/ http://nixos.org/nix/ ). Getting it to work well on OSX would be the trick. Edit: They say it should run on Mac OS X.
- telemachos 17y agoTwo other ideas worth considering: GNU stow (http://www.gnu.org/software/stow/ http://www.gnu.org/software/stow/) Rudix (http://rudix.org/ http://rudix.org/) Completely opposite approaches, but they're both worth looking at - especially if you find MacPorts or Fink too much. (Stow takes an approach similar to Homebrew's use of 'cellar' + individual subdirectories for packages; Rudix provides precompiled binaries.) Rudix in particular is perfect if you just want one or two *nix items quick on a Mac.
- xster 17y agoHere's why I don't like MacPort. If I compile a much needed new library by hand, installing a program that depends on it shouldn't cause MacPort to download and recompile EVERYTHING by itself again instead of using what's already there in Apple or compiled. And why does MacPort have 20 times more dependencies than the same program in Fink? And since it's MACPort and there are only so many types of Macs, why aren't programs in binaries yet?
- jwr 17y agoI dream of the day when someone properly ports Portage (from Gentoo, the "emerge" thing) to Mac OS X. I use MacPorts, and I've used a bunch of various package management systems, and portage is the only one that lets me maintain servers for > 5 years without reinstalling the whole thing, just upgrading the packages.
- lut4rp 17y agoSure, just use Gentoo Prefix. http://www.gentoo.org/proj/en/gentoo-alt/prefix/ http://www.gentoo.org/proj/en/gentoo-alt/prefix/
- Niten 17y agoHas anyone here tried pkgsrc on OS X?
- rtomayko 17y agoYep. It's not bad. I cloned the [experimental git repository](http://ftp.netbsd.org/pub/NetBSD/misc/repositories/git/pkgsrc http://ftp.netbsd.org/pub/NetBSD/misc/repositories/git/pkgsr...) to `/usr/pkgsrc` and was able to install most packages I tried. They seem to lag behind current versions quite a bit and some pieces of software I rely on for work weren't packaged (redis, mongo, etc.). I used it for a few months but eventually switched over to homebrew because it's a nice simple system and packages most of the stuff I need. You have to run a case-insensitive filesystem with pkgsrc (I was anyway) and, like macports, it does not use system libraries so pretty much everything needs to be rebuilt under `/usr/pkg`. It was worth experimenting with. I might check back on it when I get my new MBP. They have [a lot of packages](http://pkgsrc.se/ http://pkgsrc.se/).