Register | Login | Visitors: 176 / 24 h

Installation

Table of Contents

  1. Installation
  2. Testing

Installation

Using Snap

In this section, I am going to explain how to install ROOT locally on your computer. There are actually many possibilities to do that, depending on which method you prefer or which operating system (OS) you are using. If you use Ubuntu or an Ubuntu-based system, then the installation via Snap is the easiest way to do that. You simply have to have open a terminal and type in
 sudo snap install root-framework
The package is quite huge and the installation will take a few minutes to complete.

Compiling Source Code

Before compiling and installing ROOT you have to make sure that all dependencies are installed. If you use Debian/Ubuntu or any system based on these OS, then you can use apt to install these dependencies. The absolutely essential packages can be installed via the following command in the terminal:
 sudo apt install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev python3 libssl-dev
The following packages are highly recommend:
 sudo apt install gfortran libpcre3-dev xlibmesa-glu-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python3-dev libxml2-dev libkrb5-dev libgsl0-dev qtwebengine5-dev
The installation process has been tested with Ubuntu 22.04. For other versions, the naming scheme of the packages might change. Now you can download the newest version writing
 git clone --branch latest-stable https://github.com/root-project/root.git root_src
into your terminal. In the next step, you can create a new folder called root_build by writing
 mkdir root_build
After entering this folder via the command
 cd root_build
you can run CMake, in order to configure the build:
 cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src/
Of course you can also choose any other installation path. Now you only have to build the source code. For that propose you can either simply write
 make
or, if you have a multicore processor and want to save time, you can write
 make -jN
where N is the number of cores. When the installation is finished successfully, you can type in
 make install
and afterward, all files are copied to the installation folder. The last step is now to source the file thisroot.sh, in order to set all paths correctly. You can so this by writing
 . ../root_intall/bin/thisroot.sh
If no error message appears, you can continue with the testing of your ROOT installation.

Testing

After the successful installation, you can use your terminal again to insert the command
 root
After a short amount of time, the program will be opened and a cursor will appear. You can test the installation now by typing in for example
 root [0] 3+4
which should result in output 7. Now have used ROOT as a simple calculator, but of course, the software framework is more powerful that that. In the following chapters, we will go one by one through all the important features of ROOT. For a final test of the installation, you can now type in
 root [0] new TBrowser
and shortly after that, either a new window appears showing a file browser or your internet browser should pop up and show the ROOT browser. In both cases, the installation was successful and you are now ready to use the framework.
This page contains 609 words and 3746 characters.