Problem installing ROOT on Ubuntu 16.04

Dear all, I am trying to install root latest version obtain online with Geant 4 10.05 latest version on UBUNTU 16.04 using the following commands (having terminal in root folder)

For package installation I run the below command
sudo apt-get install cmake cmake-curses-gui build-essential libqt4-opengl-dev qt4-qmake libqt4-dev libx11-dev libxmu-dev libxpm-dev libxft-dev

It was successful

After this I tried
cmake cmake-curses-gui build-essential libqt4-opengl-dev qt4-qmake libqt4-dev libx11-dev libxmu-dev libxpm-dev libxft-dev

This command give the below error

khalid-hussain@ubuntu:~/Downloads/root$ cmake cmake-curses-gui build-essential libqt4-opengl-dev qt4-qmake libqt4-dev libx11-dev libxmu-dev libxpm-dev libxft-dev
CMake Error: The source directory “/home/khalid-hussain/Downloads/root/libxft-dev” does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

After this I run the below command using readme file instructions

This commands final few lines after execution are
1. Writing build/misc/root-help.el … done
2. Writing macros/html.C … done
3. Writing bin/ … done
4. Writing bin/thisroot.csh … done
5. Writing bin/ … done
6. Writing bin/setxrd.csh … done
7. Writing config.status … done

8. Enabled support for asimage, astiff, builtin_afterimage, builtin_lzma, builtin_llvm, explicitlink, fftw3, fitsio, gviz, genvector, krb5, ldap, mathmore, memstat, mysql, opengl, python, search_usrlocal, shadowpw, shared, ssl, tmva, vdt, x11, xft, xml.

9. To build ROOT type:

10. make
After this I enter the commands


These are the errors, please guide me

/home/khalid-hussain/Downloads/root/math/mathmore/src/GSLMultiFit.h: In member function ‘const double* ROOT::Math::GSLMultiFit::Gradient() const’:
/home/khalid-hussain/Downloads/root/math/mathmore/src/GSLMultiFit.h:146:38: error: ‘struct gsl_multifit_fdfsolver’ has no member named ‘J’
** gsl_multifit_gradient(fSolver->J, fSolver->f,fVec);**
/home/khalid-hussain/Downloads/root/math/mathmore/src/GSLMultiFit.h: In member function ‘const double* ROOT::Math::GSLMultiFit::CovarMatrix() const’:
/home/khalid-hussain/Downloads/root/math/mathmore/src/GSLMultiFit.h:157:45: error: ‘struct gsl_multifit_fdfsolver’ has no member named ‘J’
** int ret = gsl_multifit_covar(fSolver->J, kEpsrel, fCov);**
Makefile:654: recipe for target ‘math/mathmore/src/GSLNLSMinimizer.o’ failed
make: *** [math/mathmore/src/GSLNLSMinimizer.o] Error 1
khalid-hussain@ubuntu:~/Downloads/root$ cmake --build . --target install
Error: could not load cache

Please guide me

Thank you

For the name of the packages you need to install, please read

Once it will be done, please read
Especially, you have to use cmake instead of configure.

Thank you for your reply.
I have already installed these packages
sudo apt-get install git dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev
libxft-dev libxext-dev

But the cmake command does not work, please see below

Is this problem because of cmake? if yes, then how to run cmake, my terminal is in root directory

Thank you

If you read the instructions in the page you used, that is a list of packages you need to install. It is not a command that you have to run. So, first install those packages (sudo apt-get install … like they do in the previous lines) and then go to the second link @pamputt gave (“building root”) to see the cmake command you need (“quick start” section should probably do).

Thank you for the guidance.

I have tried in this way, but still facing the same error, please see where i am wrong.
All packages are successfully installed

I tried to do in accordance with the instruction mentioned in Building root as you already mentioned.
cmake path/to/source was successful
but cmake --build ask further options, and if I provide make in the place of [option to native tool] then it still not work.

If I run --build . --target install skipping [cmake --build], it gives the same error
Please guide
Thank you


Can you try to run next:

cmake /path/to/root_source_code/directory
make -j4

I think in your case, it will be something like this:

cmake ~/Downloads/root
make -j4

Thank you for the reply.
The first command is works every time [cmake ~/Downloads/root] but the second [ make -j4] gives the error after reaching on 61% and 62%. Below is the screen shot

Please guide

I see you are trying to build v6.04.18.
We recommend you to switch to latest version ROOT 6.18.04:

You can as well, download the compiled binaries for Ubuntu 16.04:

1 Like

I cloned latest version v6.18.04 from github.
root-build$ cmake path/to/root/source
The above command works fine upto 76%, after 76% it also gives the error abount undefined reference and clang, screenshot is given below

Thank you for your cooperation.

It is hard to understand what is going wrong with your build, can you try to use precompiled binaries for Ubuntu 16?

Just download it from here and extract somewhere:

If you want keep on debugging please post your output on configuration step and full error in the txt file and upload it here.

Thank you for understanding.

I downloaded it from your link and extracted it into root. After extraction I opened the reamde/install file and try to run the first command mentioned in readme/install but it gives the error of cmakelist.txt does not exist. May be this is not required in precompiled version.

Then I try to search how to install root from precompiled binaries ( , Itry to run the first command [./configure --help] but there was no such file .

As you understand my problem, so can you please suggest a set of commands that I should run? May be I am following the wrong way.


Links that you are using are very old…

I was talking about binaries of ROOT 6.18.04: . Here it is released already compiled ROOT, so you don’t need to compile it.

ROOT 5 binaries distribution is not maintained by ROOT team for the last 2 years.

What you need to do is next:

  1. Download
  2. Untar downloaded archive
tar xvfz root_v6.18.04.Linux-ubuntu16-x86_64-gcc5.4.tar.gz
source root/bin/
  1. Use ROOT (e.g. just call root from command line)

Dear @oshadura, Thank you for guiding. There is still an error, please see the screenshot below

What do you get from:
cat /etc/; uname -a; gcc --version

Thank you this is the output

You have a 32-bit system (“i686”) so you cannot use the binary distribution provided by the ROOT team (which is prepared for a 64-bit system, “x86_64”).

You must compile ROOT yourself.

You have 32-bit machine…And we distribute only 64-bit compatible binaries. Sorry!

  1. Please download source
  2. Untar file
  3. mkdir builds && cd builds
  4. cmake …/root
  5. make -j4

Thank you so much, its working now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.