They were long because the install process with CMake could be convoluted, requiring several dependencies that are occasionally non-obvious. These days, though, things are extremely simple.
If you don’t already have Homebrew installed, I highly recommend it. It makes it extremely easy to install software and to keep it up-to-date. To install CMake, for example, you would do:
In addition to the standard repository of formula, which includes formula for programs like CMake and git, there’s a repository dedicated to programs used for science, called Homebrew Science. This repository contains formula for ROOT 5 and ROOT 6.
brew only knows about the standard repository of formula, so
first add the Homebrew Science collection.
Now we can install ROOT. We’ll go with ROOT 6 here, the latest version.
That was easy!
You’ll notice that Homebrew gives you some instructions after you’ve run the installation. You can look at these instructions whenever you like.
This tells you to add a line to your shell configuration.
For the Bash shell, you can add these lines to the
.bashrc file in your home directory:
Open a new shell and try it out by running