ROOT (Data Analysis Framework) on Ubuntu 12.04

How to install ROOT on Ubuntu 12.04 easily:

Create a temporary directory, checkout the code, make, install and voila!

mkdir ~/ROOT/

cd ~/ROOT/

svn co http://root.cern.ch/svn/root/branches/v5-32-00-patches root

cd ./root

mkdir /opt/ROOT/v5-32-00-patches

export ROOTSYS=/opt/ROOT/v5-32-00-patches

./configure – -prefix=/opt/ROOT/v5-32-00-patches

make

make install

rm -rf ~/ROOT

cd ~

source  /opt/ROOT/v5-32-00-patches/bin/thisroot.sh

root

You can add  source  /opt/ROOT/v5-32-00-patches/bin/thisroot.sh in your profile so you won’t need to execute it every time you need root. This can be done by opening a terminal and type:

cd ~

vi .bashrc

go to the last line and press INS(insert)

/opt/ROOT/v5-32-00-patches/bin/thisroot.sh

save and exit (ctrl  + shift + : -> /wq-> enter)

Advertisements

24 thoughts on “ROOT (Data Analysis Framework) on Ubuntu 12.04

  1. I am just wonderin’, i’m stock in make and make install. after “make” would be “make install” right? but after “make”, i enter “make install” and i got a plenty of errors. why? can i skip make install? or i would just choose between “make” and “make install’ ? Thanks!

  2. When I mkdir /opt/ROOT/v5-32-00-patches, I get the message “mkdir: cannot create directory `/opt/ROOT/v5-32-00-patches’: No such file or directory. Any idea why?

  3. When i try “source /opt/ROOT/v5-32-00-patches/bin/thisroot.sh” i get the error “No such file or directory”. When I browse “/opt/ROOT/v5-32-00-patches” it’s empty. I didn’t get any errors during the installation. I also tried searching for thisroot.sh but I can’t find it. Any suggestions?

    • It sounds like the installation is incomplete.
      Make sure that you created the directories correctly. After export ROOTSYS=/opt/ROOT/v5-32-00-patches, try echo $ROOTSYS if you don’t get the directory on the terminal then something is wrong. You can try re-install with ./configure –prefix=/opt/ROOT/v5-32-00-patches.
      Dont forget that after a fresh installation you need to run sudo updatedb to locate new files.
      I hope this was helpful.

  4. Hi, when I try “sudo make install”, I got error messege saying:
    ———————————————–
    ~/ROOT/root$ sudo make install
    ROOTSYS not set, set it to a destination directory
    make: *** [install] Error 1
    ———————————————–
    What is wrong? Thanks.

      • Hi,
        I have the same problem. But the path to the directory is set for sure and I got the same error message.
        Any suggestions?
        Thanks

      • Hi Sciteshell, thanks for help.
        But I’ve tried it and this showed up: ./configure –prefix=/opt/ROOT/v5-32-00-patches Checking for source directory … /home/radim/ROOT/root Invalid architecture. Try ./configure –help

  5. Hi! I have a combination of the problems above:
    I have created the /opt/ROOT/v5… directory, but it’s empty, and when I do the export command, I get no errors, but nothing appears in the opt/ROOT/v5… directory. So that when I do ‘make install’, I get the error ‘ROOTSYS not set, set it to a destination directory’. I then try (as suggested earlier) to run the sudo export … command, but it doesn’t help…
    Any suggestions? Thanks!

      • Hi! Thanks for the reply!
        I tried with the prefix option, but I got this error message:

        peder@peder-ThinkPad-X220:~/ROOT/root$ ./configure –prefix=/opt/ROOT/v5-32-00-patches
        Checking for source directory … /home/peder/ROOT/root
        Invalid architecture. Try ./configure –help

        Do you know how to fix this?
        Thanks!

      • Hi again,
        Sorry to bother with the same question again, but I can’t seem to complete the “make install” step. When I try to do so, I get ‘ROOTSYS not set, set it to a destination directory’. I’ve tried the export and prefix option, and for the latter I get an error saying ‘Invalid architecture’. I’m running 64 bit, is that what’s causing this maybe?
        Thanks!

  6. I am trying to add pyroot to this installation

    To do this I use
    ./configure –enable-python –prefix=/opt/ROOT/v5-32-00-patches

    and added the following lines to my .bashrc

    export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD_LIBRARY_PATH
    export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH

    However even after doing all this I get the same error I got after the installation given above

    “ImportError: No module named ROOT”

    Some forums I have been looking through give the suggestion to try

    > sudo apt-get install libroot-python-dev

    however this returns

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package libroot-python-dev

    apt-get is totally up to date and so I am stuck.

    Thanks in advance

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s