The PATH of root binary files

Hello,

I installed root from a while on my Ubunru pc, it opens from any directory when I type $root …

Now how to know the PATH of root ? because i install a package related to root give an error:

ROOT binary folder must be placed in the global environment variable $PATH

so I have to know root PATH to define for the environment variable $PATH …

Cheers,
S.

What tells you

which root

Is that the installing directory or what ? 

But now when I try to upload the package, i type the following: 

[code]export PATH=/usr/bin/root:$PATH
[/code]

and it still gives me the same error: 

[code]ROOT binary folder must be placed in the global environment variable $PATH
[/code]

Cheers,
S.

Is that the installing directory or what ?

But now when I try to upload the package, i type the following:

export PATH=/usr/bin/root:$PATH

and it still gives me the same error:

ROOT binary folder must be placed in the global environment variable $PATH

Cheers,
S.

What is this package?

It’s MadAnalysis:

launchpad.net/madanalysis5

Also is /usr/bin/root the excusable root file ?

The message in question is just a suggestion of what could be the origin of the problem. But looking at the code it is complaining of not finding root-config, which is actually the problem.

            self.logger.error('ROOT module called "root-config" is not detected.\n'\
                          +'Two explanations :n'\
		          +' - ROOT is not installed. You can download it '\
		          +'from http://root.cern.ch\n'\
		          +' - ROOT binary folder must be placed in the '\
                          +'global environment variable $PATH')

Can you execute root-config in your installation?

Hi mato,

I think now I’m facing another problem, MadA found root files, but can’t see PyROOT lib. Here is what I did and hope not to be long reply :slight_smile:

I downloaded a newest version for root : root_v6.06.00, then executed on root directory:

./configure --enable-python

then
make

then to set the environment variables:

$ export ROOTSYS=/home/safi/root-6.06.00

export PATH=$PATH:$ROOTSYS/bin 

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib

export PYTHONPATH=$PYTHONPATH:$ROOTSYS/lib

When I went to MadAnalysis and it gave me that error it can’t find root binary files, I typed:

export ROOT_HOME=/home/safi/root-6.06.00 export PATH=$PATH:$ROOT_HOME

Now it dose not give the previous error, but it gives:

ERROR: ROOT library called 'libPyROOT.so' not found. Please check that ROOT is properly installed.

When I make : locate libPyROOT.so, it gives :

/usr/lib/i386-linux-gnu/root5.34/libPyROOT.so /usr/lib/i386-linux-gnu/root5.34/libPyROOT.so.5 /usr/lib/i386-linux-gnu/root5.34/libPyROOT.so.5.34 /usr/lib/i386-linux-gnu/root5.34/cint/stl/libPyROOT.so

I tried :
export PYTHONPATH=$PYTHONPATH:/usr/lib/i386-linux-gnu/root5.34

but the same error …

You see I have on my pc an old root-> root5 for 32 bit gcc (in which I were asking in the beginning of the question how to find the extension of its home folder), in which its lib in (/usr/lib/i386-linux-gnu/root5.34/), while I’m try to link MadA with other version of root -> root6, but where its PyROOT. so libraries ?

Cheers,
S.

The newest version of ROOT is 6.06/04. See root.cern.ch/content/release-60604
You should build ROOT 6 using CMake. See the instructions at root.cern.ch/installing-root-source
You should not mix versions :slight_smile:. Setting the PYTHONPATH to version 5 and the rest to version 6 is very bad.
To set the proper environment you just need to source /bin/thisroot.sh

Thanks, it’s solved.

Cheers,
S.