Macos – Forcing Homebrew and Macports to coexist

homebrewmacosmacports

I have a MacOSX system that I've been using for a number of years, and during this time, I have installed quite a few packages via Macports.

I now want to try Homebrew, but it's clear from what I've read here and elsewhere that the default installations of Homebrew and Macports cannot easily coexist.

It is not a viable option for me to uninstall Macports, since so much of my daily MacOSX work involves using various Macports-installed utilities. Furthermore, many of my own, homegrown utilities are now interdependent with Macports. And finally, a lot of executables and shared libraries that I routinely use are now installed under /usr/local, and my system would quickly become unusable if I cleared out that directory tree.

So my question is this: has anyone come up with an alternate way to install Homebrew which can coexist with Macports? Specifically, has anyone figured out how to make Homebrew utilize a directory tree such as /usr/local/homebrew instead of /usr/local?

Thanks in advance for any suggestions or pointers to docs.

Best Answer

You can tell Homebrew to use its own directory, and then add that to the path. Although not for the same purpose, this excerpt from the installation guide tells it:

Multiple installations

Create a Homebrew installation wherever you extract the tarball. Whichever brew command is called is where the packages will be installed. You can use this as you see fit, e.g. a system set of libs in /usr/local and tweaked formulae for development in ~/homebrew

Source: https://github.com/mxcl/homebrew/wiki/installation

Related Question