⏱reading time: 3 min

A couple of days ago I just found out that when you install R with Homebrew you don’t get all the capabilities that the binary from CRAN have. In other words, you have a kind of second class install, in some regards, and depending on how you do install and for what you are going to use R.

How did I notice? Well basically I was about to update the sm package in one of my computers and R yield an error similar to this one (sorry I didn’t copy the original one):

As you can see I’ve highlighted the key line, R doesn’t have tcltk available and running in that system and if you run capabilities() in the R console you’ll probably get something similar to the first code-block. After researching a little bit about the problem [1 & 2], I found out what I’ve already said, Homebrew R isn’t build with those capabilities. Why? Well…

  1. It seems that those capabilities are optional when you build R from source and build R with those capabilities / options on Homebrew’s bottle server is “error prone”.
  2. To have some of the missing capabilities you must have in your system X11/XQuartz, which isn’t installed in every Mac, because it’s not longer provided as macOS basic installation.
  3. You can install X11/XQuartz, but you have to do it with Homebrew Cask, since it can’t be build from source. As a consequence is a off project dependency and they don’t want to rely on that.
  4. Homebrew seems to be heading to a option-less direction where the formulas aren’t going to have any option at all. So if you want to have options or different kind of build they encourage you to have your own tap.

Whether you agree or not, you have to understand that the maintainers of Homebrew-core took this direction for a reason, which is probably they have already too much work to do. Don’t forget they maintain the package manager for free. If you disagree, as I do, at least partly, please be polite. A lot of users have been expressing their disagreement in really bad manners lately and that is not acceptable.

Lucky for us users, there is a solution to the problem. You can always create your own tap of Homebrew and tweak the formula to fit your needs, as maintainers suggest. As a result someone already did that and there is already a tap which you can install R with the same formula we installed R when it was in Homebrew Science, but up to day.

I’ll explain in my next post how to install R using that tap.


One thought on “Homebrew’s R doesn’t have all the capabilities

Leave a Reply