
Install CERN-ROOT
We are giving here only the instructions for Ubuntu 20. In other cases follow the link. For Ubuntu 20 pre-compiled binary image is available and we are going to install from there. If you have a system where pre-compiled binary is not available, it is best to go through the long procedure of installing ROOT from source. If you install through snap repository (sudo apt install snapd; sudo snap install root-framework) the installation is often incomplete and LAMPS with ROOT capability is unlikely to work.Dependencies
First you have to take care of installing packages that ROOT needs. You can see the full list here. The easy way to install all dependencies is to type the following two command on a terminal:
$ sudo apt install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev
$ sudo apt install libxft-dev libxext-dev python libssl-dev
For your convenience, I have split the requirements into two commands. Alternatively you can type a single command split over two lines using the backslash line continuation character like this:
$ sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \
libxft-dev libxext-dev python libssl-dev
Install ROOT
Detailed instructions are in this link. The is the easy way is to type the following commands on a terminal:
$ wget https://root.cern/download/root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
$ tar -xzvf root_v6.24.02.Linux-ubuntu20-x86_64-gcc9.3.tar.gz
$ source root/bin/thisroot.sh
The command source root/bin/thisroot.sh
should be added to your .profile hidden file so that you dont have to type it after every login. This command allows you to run ROOT from anywhere.
Running ROOT
If the command source root/bin/thisroot.sh
is active, you can start ROOT from any directory just by typing root.