One of the reasons I'm still using macports is that it is easy to switch between versions of things you download. For example, if I want to change my GCC version to 4.8 all I have to do is
sudo port set --select gcc mp-gcc48
No mucking around in environmental variables. I see that there are multiple versions of gcc to be got from homebrew, but is there an easy way to activate and deactivate versions of things? I didn't notice anything in the documentation.
Option 1 is that you install multiple versioned packages in parallel. Then you'd call gcc-4.7
or gcc-4.8
, etc.
Option 2 is to selectively brew link
and brew unlink
the package versions that you prefer to use. Note that an "unlinked" package is still installed and usable from /usr/local/opt/<package>/
, it's just not in the default path.
Which one you use depends on how the individual packages are set up and how often you need to switch around. It's perhaps not quite as clear-cut as with MacPorts, but it works just fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With