0% found this document useful (0 votes)
29 views2 pages

How To Install Root

This document provides a step-by-step guide for installing the latest version of ROOT on various *NIX based operating systems, including Mac OS X, Debian, and Red Hat systems. It outlines necessary pre-requisites, commands for downloading and configuring ROOT, and instructions for setting environment variables to ensure ROOT runs in future terminal sessions. Additionally, it offers troubleshooting advice for building issues and guidance for installing an earlier version if needed.

Uploaded by

marciokf13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

How To Install Root

This document provides a step-by-step guide for installing the latest version of ROOT on various *NIX based operating systems, including Mac OS X, Debian, and Red Hat systems. It outlines necessary pre-requisites, commands for downloading and configuring ROOT, and instructions for setting environment variables to ensure ROOT runs in future terminal sessions. Additionally, it offers troubleshooting advice for building issues and guidance for installing an earlier version if needed.

Uploaded by

marciokf13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Installing ROOT

Nick Tyler

This is a simple guide on how to easily install the latest version of ROOT on
most *NIX based operating systems. Open a terminal and execute the folowing
commands for the appropriate operating system.
First it’s important to install a few pre-requisites.
For Mac OS X:
$ xcode-select --install

For Debian based systems (Ubuntu):


$ sudo apt-get install git dpkg-dev make g++ gcc binutils libx11-dev
$ sudo apt-get install libxpm-dev libxft-dev libxext-dev
For Red Hat based systems (Fedora, Centos):

$ sudo yum install git make gcc-c++ gcc binutils libX11-devel


$ sudo yum install libXpm-devel libXft-devel libXext-devel
The following steps will work on all systems. Next we will move to the directory
where we will install ROOT:

$ cd /usr/local/

To download the ROOT files run the following command:

$ sudo git clone https://github.com/root-mirror/root.git

Next we will change the ownership of the folder root with:

$ sudo chown -R "username" root


Replace “username” with your username. If you don’t know your username
on your computer use the “who” command, your username will be in the first
collum.
Now enter the root folder to start building the code:

$ cd root && ./configure --all && make -j 4

If there are problems building the code in thise way try:

1
$ make clean && ./configure --minimal && make

Once it is done building run the command.

$ source bin/thisroot.sh
Now you should be able to run root with from your terminal with the command
“root”. In order for root to work after closing terminals or after shutdowns you
must add root to your path.
For Mac OS X based systems running bash:
$ cd
$ nano .bash_profile
For linux systems running bash:

$ cd
$ nano .bashrc
Add the following lines to the end of the file that is open in the nano text editor.
#Include Path For CERN ROOT
export ROOTSYS=/usr/local/root
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
Then close nano with control + x and save by typing y and then enter. Now
root should open in any terminal you run even after a reboot.
On older systems or if you encounter errors during the configure setup it is
sometimes helpful to install an earlier version of root. To get an earlier version:

$ cd /usr/local/root
$ git checkout -b v5-34-00-patches

Then the steps can be followed from the configuration and make steps from
above.

You might also like