How do I install root-cern?
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?
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.
You can download a compiled package from here http://sourceforge.net/projects/cernrootdebs/ it is quite straightforward. Read the instructions.
To reply to Roland Taylor: the instructions are listed in the Readme file. The installation requires simply a double-click on the deb archive.
Quoting: "This package is going to be installed on /opt/root dir, to not conflict with Root package provided by Ubuntu repos. So you might want to create a symbolic link in /usr/bin; this is my choice:
sudo ln -s /opt/root/bin/root /usr/bin/root-latest
so you can run root from ubuntu repos typing root, or my version typing root-latest (to upgrade from a previous version packaged by me, first remove old package)"
In case root doesn't start because it doesn't find libCore.so, but these two lines in your ~/.bashrc
export ROOTSYS=/opt/root/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib/root:
Enabled support for asimage, astiff, builtin_afterimage, builtin_ftgl, builtin_glew, cintex, explicitlink, fftw3, genvector, krb5, mathmore, memstat, minuit2, opengl, pgsql, python, reflex, roofit, shadowpw, shared, ssl, tmva, unuran, x11, xft, xml."