Ubuntu – How to install root-cern

11.04installationrootx11

Cern's ROOT environment installs fine on 10.10, and is even available in the Software Center, but it will not install or compile on Natty because the x11 directories are in new locations.

I can redefine the paths, but then I get compile errors because only gcc 4.3 is supported through ROOT and Natty uses 4.5. I've given up and gone back to 10.10, but my question is, after installing ROOT on Maverick, if I upgrade back to Natty, will my old software still work with these new directory paths?

Best Answer

It's a pitty that root is not in repository anymore (applies for Ubuntu 11.04). Here is a way

HOW-TO install root on Ubuntu Natty (x86):

DEPENDENCIES:

sudo aptitude install gcc g++ make binutils \
                      libx11-dev libxpm-dev libxft-dev libxext-dev
OPTIONAL DEPENDENCIES: (I've this installed)
sudo aptitude install cmake \
                      gsl-bin libgsl0-dev \
                      liblzma2 liblzma-dev \
                      libgmp3c2 libgmp3-dev \
                      libpcre3 libpcre3-dev \
                      zlib1g zlib1g-dev

HOW TO INSTALL:

wget ftp://root.cern.ch/root/root_v5.30.00.source.tar.gz
tar -xzvpf root_v5.30.00.source.tar.gz
cd root

WHERE_TO_INSTALL_ROOT=/usr/local     ## feel free to change this
./configure linux \
            --with-x11-libdir=/usr/lib/i386-linux-gnu \
            --with-xft-libdir=/usr/lib/i386-linux-gnu \
            --with-xext-libdir=/usr/lib/i386-linux-gnu \
            --with-xrootd-opts=--syslibs=/usr/lib/i386-linux-gnu \
            --prefix=$WHERE_TO_INSTALL_ROOT

make
# sudo make install                     ## sudo needed at least for for /etc/root
# NEVER use make install in modern distros. Instead use:
sudo checkinstall --pkgname=root-framework --fstrans=no --strip=no make install
sudo 

cd $WHERE_TO_INSTALL_ROOT
source bin/thisroot.sh
root                                  ##  :-)   works...
       .Q                             // to quit root

NOTE: At a time of writing this 5.30/00 was latest and recommended version. Feel free to change this to other (I suggest recommended) version available at time you are reading this.

Related Question