Jump to content

Installing ROOT

From Luter 345 Experiments
Revision as of 17:59, 24 December 2024 by Brash99 (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Step 1: Update system, and install prerequisite packages[edit | edit source]

Choose Applications->System Tools->Terminal to open a terminal window. You should also add this to the Panel by choosing Applications->System Tools->Right Click on Terminal and choose "Add this launcher to panel".

Update the system (you will need to enter the root password again when prompted, and choose the default options):

sudo yum update

Install the ROOT required packages:

sudo yum install git make gcc-c++ gcc binutils libX11-devel libXpm-devel libXft-devel libXext-devel

Install the ROOT optional packages:

sudo yum install gcc-gfortran openssl-devel pcre-devel mesa-libGL-devel glew-devel ftgl-devel mysql-devel 
sudo yum install fftw-devel cfitsio-devel graphviz-devel avahi-compat-libdns_sd-devel 
sudo yum install libldap-dev python-devel libxml2-devel gsl-static

Step 2: Download and install ROOT from source using make[edit | edit source]

From a terminal window, in the home directory of the local user that you created, do:

git clone http://root.cern.ch/git/root.git

Note that downloading the source could take several minutes. Once downloaded, there should be a new "root" directory under your home directory. Now, do:

cd root
git checkout -b v5-34-08 v5-34-08
./configure --prefix=/usr/local
make
sudo make install

Note that the C++ compiler that ships with Centos6.6 is not compatible with ROOT version 6. Thus, we need to work with ROOT version 5, and so that is why we checkout a stable version 5 branch of ROOT above.

Also, the make command above might take 30 minutes or so to complete, depending on the machine that you are working on.

Update the ldconfig cache by doing:

sudo ldconfig

Set up the PATH and LD_LIBRARY_PATH environment variables by doing:

source /usr/local/bin/thisroot.sh

To make this permanent, you should add this command to the .bashrc file in your home directory. To do this, execute the following:

cd
gedit .bashrc

Add the source line above to this file, and then save the file and exit the editor.

Finally, try running ROOT:

root