Home | News | Documentation | Download

Root Installation on WSL Ubuntu

Hello everybody,
I have a Windows 10 operating system and I am trying to install the ROOT version v6-22-00 on the Windows Subsystem for Linux with Ubuntu version 20.04.1 LTS.
I did these steps:

  • update of Windows
  • update and upgrade of Ubuntu
  • installation of all the required dependencies unless the package “openssl-dev” and “libqt4-dev” because it did not work
  • cmake --build . --target install

Everything went fine up to the 85% when it was “Generating G__Ged.cxx, …/…/lib/Ged.pcm” and I got this error message:

<<< cling interactive line includer >>>: fatal error: module file '/home/serena/lib/MultiProc.pcm' is out of date and needs to be rebuilt: could not read module signature
<<< cling interactive line includer >>>: note: imported by module 'TreePlayer' in '/home/serena/lib/TreePlayer.pcm'
Error: Module 'TreePlayer.pcm' failed to load.
Error: Error loading the default header files.
make[2]: *** [gui/ged/CMakeFiles/G__Ged.dir/build.make:127: gui/ged/G__Ged.cxx] Error 1
make[1]: *** [CMakeFiles/Makefile2:25139: gui/ged/CMakeFiles/G__Ged.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

I am trying to google the problem but I did not get any answer or solution…
Does anyone have an idea of what can be the problem and maybe how to fix it?

Thank you very much in advance!


Unless you have a specific reason for compiling ROOT, you don’t need to do it; just download and use the precompiled binary for Ubuntu 20.04 in your case (keep the dependencies you already installed).

1 Like

Thank you for the answer.

In this case, do I need to remove what it has built up to 85% before use the precompiled binary ?

Not necessarily, it depends on where you were putting everything, but I suggest to remove that to avoid any future confusions. If you were copying and compiling all in your home, e.g. under /home/serena/root, you can just delete that folder (“root”) with everything inside it (of course making sure you don’t have in there anything else you want to keep). If you were compiling for the system (somewhere in /bin or /lib?), then I suppose the makefile should provide some clean-up option.

I removed them and installed the precompiled version which now works! Thank you :slight_smile:

Just another question: I tried to draw a simple function as in the “Get Started” Guide:

TF1 f1(“f1”,“sin(x)/x”,0.,10.);

then it says

“Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1”

but it does not display the Canvas. Do you know by chance if this can is due to a missing library or dependecy?

WSL does not have a graphics server. You need to install (and keep running) an X server like Xming or VcXsrv, and add this line at the end of your ~/.bashrc

export DISPLAY=localhost:0
1 Like

I installed VcXsrv and now it works!
Thank you very much for the help :slight_smile:

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