ROOT global environment

I have root on my machine, because when I type $root, it starts, but I think I missed something in defining its PATH, because when I try to run some backage related to root, it gives me this error …

  • Root [FAILURE]
    ** ERROR: ROOT module called “root-config” is not detected.
    Two explanations :n - ROOT is not installed. You can download it from
  • ROOT binary folder must be placed in the global environment variable $PATH

So how to define ROOT probably on my machine ?


Did you install ROOT on your machine? What machine is that?
The way in which the ROOT environment is set is via the “thisroot.[c]sh” script.
You can refer to one of the release pages, e.g. section “Example of setting up ROOT and the corresponding compiler on AFS”.

I’m using ubuntu 13.03, gcc: 32. bit

so if root running well when I type $root, from any directory, why when i upload this package, it can’t execute root files ?
I tried to install root again form


But I find only releases for ubuntu 14 or 12, do you think this is the problem ?

because when i installed the new root sources and typed; . bin/, it gives me errors

i don’t know weather this is due there is already installed root, or due to the difference in platforms …


I propose you download root, configure it and compile it. You can follow the instructions here:
Be sure you install the build prerequisites before proceeding.
Let us know how it goes.


Hi Danilo,

It gives me the following error when I typed
builddir$cmake /home/safi/root

[code] Could not find a package configuration file provided by “ROOT” with any of
the following names:


Add the installation prefix of “ROOT” to CMAKE_PREFIX_PATH or set
"ROOT_DIR" to a directory containing one of the above files. If "ROOT"
provides a separate development package or SDK, be sure it has been

Although /home/safi/root containing folder called cmake has ROOTConfig.cmake ?

ps: I downloaded: root_v6.06.04.Linux-ubuntu14-x86_64-gcc4.8.tar.gz


you should try with the sources and not with the binaries for ubuntu.



Now cmake /home/safi/root-6.06.00, works fine

but I can not follow, the other steps: cmake --build ? :neutral_face:

Hi Safinaz,

simply “make -j N” where N is the number of cores you want to dedicate to the compilation.


Hi Dpiparo,

Thanks, it’s solved :slight_smile: