qazwsx
qazwsx

Reputation: 26868

How to use macports and homebrew package management systems together?

How to use macports and homebrew package management systems together without having them interfere with each other in bad ways?

Upvotes: 3

Views: 2393

Answers (1)

ryandesign
ryandesign

Reputation: 1144

It's best to use just a single package manager and uninstall the others. If, for example, you want to use MacPorts, but there's a program you need that's not in MacPorts, consider filing a MacPorts port request ticket.

If you insist that you must install multiple package managers, then please install all of them in nonstandard prefixes. MacPorts' default prefix is /opt/local. Homebrew defaults to /usr/local. Fink uses /sw. Build each package manager from source manually, selecting a unique install prefix for each that is different from all of the preceding default paths. This is to ensure that software packages that have hardcoded knowledge of these package managers' default paths do not inadvertently find dependencies from the wrong package manager.

When you install a port with MacPorts, it clears most environment variables; this is to ensure that, even if you have, say, /usr/local/bin and /sw/bin in $PATH, MacPorts will not find things there. I don't know whether Homebrew and Fink do this too; if they don't, change your $PATH so that it doesn't contain locations with potential third-party dependencies, before you install anything using Homebrew or Fink.

Upvotes: 5

Related Questions