Easy way to update ROOT?

I writing to ask whether there is any simple way to keep track of the latest ROOT update.
For example, I build ROOT-6 20/04 several month ago from the source code with CMake. What would be the best way to update to version 6.22/00 ?


Please read tips for efficient and successful posting and posting code

ROOT Version: 6.20/04
Platform: ubuntu 18.04
Compiler: gcc-7.5.0

Maybe this post can give you some hints, in particular:

There is also an Install page on the ROOT web site

1 Like

I’ve created some unofficial DEB packages for Ubuntu and Debian to make it easier for users to install.

You can install it like shown below and no setup is required to use ROOT after that.

$ wget https://cern.ch/amadio/root/root_6.22.00_ubuntu18_amd64.deb
$ sudo apt install ./root_6.22.00_ubuntu18_amd64.deb

If you later want to uninstall:

$ sudo apt remove root && sudo apt autoremove


I’ll try to provide a general perspective on the matter.

There are several ways ROOT can be installed on ubuntu 18.04, all listed at https://root.cern/install as @couet suggested. What’s the method to upgrade an existing installation depends on the method you installed ROOT with in the first place.

For example, if ROOT installed via a package manager such as conda or apt (e.g. using @amadio’s .deb package) upgrading is just a matter of telling the package manager to install the newer version – that should also remove the old one as the package manager knows it’s a conflict. At worst, you’ll have to tell the package manager to uninstall ROOT and then install the newer version, which is maybe two commands instead of one. Still manageable.

Compiling ROOT from source like you did is the best way to customize ROOT, but then you have the responsibility to manage that ROOT installation. If you have not installed ROOT in system directories such as /usr/local after compilation (you can check where your ROOT installation resides with which root, for example), then upgrading should be a matter of removing your current installation (e.g. removing the build/install directory) and compiling again. If you did install ROOT in system directories, you have to manually remove it from there.

As using a package manager takes care of a lot of that complexity, I would suggest installing ROOT as a conda package or a .deb package. If you need special compilation options or tweaks, then you can compile ROOT yourself, and manage where ROOT is installed as well as removals manually.

Also: we are working on an official .deb package based on @amadio’s work, so soon we will have a one-liner apt invocation that installs ROOT and makes it easy to manage the same way as you manage any other package on Ubuntu or Debian. Work in progress :smile:

Hope this clarifies things a bit!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.