Problem with root 5.34 installation in ubuntu 12.04

Hello rooters!

I’ve just upgraded to ubuntu 12.04 and wanted to reinstall root. While everything seems to go fine I cannot start root. What I did was

[ul]Installed libraries/packages
subversion, dpkg-dev, make, g++, gcc, binutils, libx11-dev, ibxpm-dev, libxft-dev, libxext-dev gfortran, ncurses-dev, libpcre3-dev, xlibmesa-glu-dev, libglew1.5-dev, libftgl-dev, libmysqlclient-dev, libfftw3-dev, cfitsio-dev, graphviz-dev, libavahi-compat-libdnssd-dev, libldap-dev, python-dev, libxml2-dev, libssl-dev, libgsl0-dev. [/ul]

Then in terminal

svn co http://root.cern.ch/svn/root/tags/v5-34-03 root cd root ls ./configure make

Then I edited the bashrc adding

export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH cd root . bin/thisroot.sh cd

But when I type root in terminal it says that cannot find command root. What could be wrong?
Thank’s a lot!

I use Ubuntu 12.04, and it seems to me that I had some trouble with the thisroot.sh script.

If configure and make showed no errors, did you check that $PATH and $LD_LIBRARY_PATH are set correctly (eg, printenv | grep PATH)?

I ended up setting PATH and LD_LIBRARY_PATH explicitly (ie, hard code the paths). If you have multiple versions of root, you have to keep track that you are sourcing the correct version, but it is probably the simplest way to get up and running.

Thank you very much for your reply!
I don’t have other root version installed.

Now as far as the paths are concerned, the only thing I did was to add in the bashrc the following

export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH

but it doesn’t seem to help. I also, tried to run root from inside the root directory, but again ubuntu cannot seem to recognize the command root.

Note, that I am not an expert in linux…

did you try to run it outside bashrc script? in a terminal cd to root dir and execute

maybe you have to add rest of the path to root directory.

cd $HOME/root source bin/thisroot.sh cd

there is another possibility that exec file has another name as i had met lately.
cd to root dir and try ls bin/ |grep root. look for other name such as root.exe, roots.exe etc. i dont remember the names but they have different meanings to run, one of them being the usual root exe file

Perhaps you don’t have ‘.’ (the current directory) in you path? Eg: export PATH=.:$PATH

Thank you very much for your help!
I used the following code

export PATH=$ROOTSYS/bin:$PATH export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH cd root . bin/thisroot.sh cd
the one that I used at the beggining!

The problem is that I just saved the bashrc without

After that it worked like a charm!However if I open a terminal in a USB stick for instance I get this code

bash: cd: root: No such file or directory bash: bin/thisroot.sh: No such file or directory thanos@thanos-laptop:~$
So, something really is still wrong.

In addition, I remember that I have edited the bashrc in order to replace root -l with root, but I can’t remember how. Any idea?

My root folder is in /home/thanos/root. I changed the paths accordingly like this

export PATH=/home/thanos/root/bin export LD_LIBRARY_PATH=/home/thanos/root/lib:$LD_LIBRARY_PATH
However when I start root, in any folder a get the following message

but root starts and runs normally! I also try to edit bashrc but when in home and type

I get the message

Command 'gedit' is available in '/usr/bin/gedit' The command could not be located because '/usr/bin' is not included in the PATH environment variable. gedit: command not found
The same happens even if I use ls…but thankfully I fixed it by changing the PATH like this

I have everything messed, haven’t I?

I think I’ve found my way around this!
I just added

at the end of the bashrc and it seems to be working in all directories.

I just don’t know how to replace root -l with root

You can set up an alias to always include certain options, e.g. add this to your .bashrc

alias root='root -l'

I believe it is not possible to turn off the splash screen from the rootrc which if true is a shame.

Thank you very much for your solution!
You suggested edit did work!
And there is no splash screen when starting root!
Thank’s a lot!

Hmm, I had trouble installing 5.34 on my 32-bit Ubuntu, and was getting the
"libX11 MUST be installed"
error. Beginning around line 2550 of the “configure” file, I noticed that I needed to add “/usr/lib/i386-linux-gnu” to several library lists (I suspect something similar would be needed for 64-bit).

Once “configure” ran, I then “sudo make” which runs for a while. Then I “sudo make install”, and this crashes with
"undefined reference to `TIFFOpen’" (and others)
so I had to rerun the command that crashed adding “-ltiff -lpng -ljpeg” at the end of that command:
"
g++ -shared -Wl,-soname,libASImage.so -m32 -O2 -Wl,–no-undefined -Wl,–as-needed -o lib/libASImage.so graf2d/asimage/src/TASImage.o graf2d/asimage/src/TASPluginGS.o graf2d/asimage/src/G__ASImage.o -Llib -lGraf -lMathCore lib/libAfterImage.a -L/usr/lib/i386-linux-gnu -lfreetype -lz -lz -lXpm -lXext -lX11 -Llib -lCore -lCint -ldl -ltiff -lpng -ljpeg
"
Then I “sudo make install” again and it finishes. I finally add “. /usr/local/root/bin/thisroot.sh” to my bashrc, and everything works perfectly. Now I can do my analysis locally instead of our shared tier3 machine (and the monster desktop I built is slightly faster). Thanks, ROOT!