Skip to content
Prev 13066 / 15075 Next

Homebrew [was: from Mac to LInux?]

That main objection is that people are mixing Homebrew with CRAN and vice-versa which leads to many problems. You cannot use packages from CRAN when using Homebrew, period, and you have to be really careful if you want to mix Homebrew libraries (not anything R-related) with CRAN (it is doable if you know what you're doing).

The fundamental issue is that package managers like Homebrew replace system libraries with their own (for new features/updates that the system libraries don't provide) which break anything that relies on the system library. Out of all the package managers Homebrew the only one that is trying to address the issue by trying to separate them, but even that has been diverging over time.

The second issue is that they are increasingly replacing toolchains (compilers) with their own builds, which makes everything incompatible in explosive ways (things just segfault). Making sure that a compiler toolchain is stable is actually non-trivial and many packager manager authors/maintainers have little experience with this. That used the be the primary reason to avoid them, because it was just normal that the released binaries were miscompiled and things would break all the time. Fortunately, I think that has gotten better over time.

If you stick only with Homebrew, then you're likely ok, but you're on your own and have to compile all packages form sources. Majority of our time as CRAN maintainers for the binary releases is about providing dependent libraries for packages and making sure things "just work". It is doable, just a lot of work, so by using Homebrew every user has to spend that time.

(FWIW I use Hombrew myself for tools, but not in /usr/local (I'm using /opt/brew) and I only put it on the PATH for the tools that I need, never to compile anything "native" against it.)

Cheers,
Simon