Installation problems (Ubuntu 14.04)

You apparently have some version of ROOT installed in “system directories” ("/usr/lib/x86_64-linux-gnu/").
You must “completely remove” (“purge”) all “system-provided” ROOT related packages (this includes any “official” packages that originate from your operating system’s repositories as well as any version that you yourself built).
Then configure and make your new version of ROOT from scratch.
Note: this is explicitly written in [url=https://root-forum.cern.ch/t/missing-canvas/17664/17 of the old posts that I gave you[/url].

PS: That g++ line was NOT the result of the command make after the execution my “configure” line (yes, I can clearly see that there’s something missing in that line, which must have had been there if ROOT was configured according to my “configure” line).

Actually in usr/lib/x86_64-linux-gnu/ there is the directory root5.34, but how do I completely delete root & everything related to it in order to configure and make a new version of it? Should I simply delete that directory (and the one that contains root’s source), or something more is required?

Try:
sudo dpkg --list ""|grep libroot
sudo apt-get purge libroot

Done. But the root5.34 directory is still there (almost empty. It only contains 2 .so files “Physics” & “Postcript”). Neither was removed the directory “root”, which contains root’s source files. Is it correct? What should I do next?

Maybe:
sudo dpkg --list ""|grep root-plugin
sudo apt-get purge root-plugin

Apparently no result: everything seems to be as it was before the execution of those commands.

Then maybe:
sudo dpkg --list ""|grep root-system
sudo apt-get purge root-system

Those two libraries are still there.
Apparently now on my pc I have these files/directories regarding root (or, at least, these are the “visible” ones):
[ul]
root_v5.34.23.source.tar
root (directory created once .tar was unpacked)
root5.34 (directory in urs/lib/x86_64-linux-gnu/)
[/ul]

Try again:
sudo apt-get purge root-system* root-plugin* libroot*

Nothing changed.
While executing the command, I get a list of:
Package ‘***’ is not installed, so not removed
So probably the previous executions went well, but I cannot remove those two libraries; even if I try to do it directly from the root5.34 directory. Should the directory root, with the source files, be removed?

Try to reboot your machine.

Then execute again (see if it still finds any libraries in any “system directories”):
locate libCore
locate libCint

BTW. It seems to me that “libPhysics” belongs to “libroot-math-physics5.34” or “libroot-math-physics-dev” while “libPostscript” belongs to “libroot-graf2d-postscript5.34” or “libroot-graf2d-postscript-dev”.

After the reboot nothing changed.
If I try to locate libCint and libCore i get:

/home/matteo/root/cint/build/libCint.mk /home/matteo/root/lib/libCint.so /usr/lib/x86_64-linux-gnu/libCint.so /usr/lib/x86_64-linux-gnu/libCint.so.5.34 /usr/lib/x86_64-linux-gnu/libCintex.so /usr/lib/x86_64-linux-gnu/libCintex.so.5.34 /usr/lib/x86_64-linux-gnu/root5.34/libCint.so /usr/lib/x86_64-linux-gnu/root5.34/libCint.so.5 /usr/lib/x86_64-linux-gnu/root5.34/libCint.so.5.34 /usr/lib/x86_64-linux-gnu/root5.34/libCintex.rootmap /usr/lib/x86_64-linux-gnu/root5.34/libCintex.so /usr/lib/x86_64-linux-gnu/root5.34/libCintex.so.5 /usr/lib/x86_64-linux-gnu/root5.34/libCintex.so.5.34

/home/matteo/root/lib/libCore.so /usr/lib/x86_64-linux-gnu/libCore.so /usr/lib/x86_64-linux-gnu/libCore.so.5.34 /usr/lib/x86_64-linux-gnu/root5.34/libCore.rootmap /usr/lib/x86_64-linux-gnu/root5.34/libCore.so /usr/lib/x86_64-linux-gnu/root5.34/libCore.so.5 /usr/lib/x86_64-linux-gnu/root5.34/libCore.so.5.34

But if I look for them in root5.34 I cannot find them. In root5.34 there are postscript and physics, nothing else.

What do you get if you try:
ls -al /usr/lib/x86_64-linux-gnu/lib[CP]*
ls -al /usr/lib/x86_64-linux-gnu/root5.34/

I get the following output:

lrwxrwxrwx 1 root root 22 nov 28 16:27 /usr/lib/x86_64-linux-gnu/libPhysics.so -> root5.34/libPhysics.so lrwxrwxrwx 1 root root 25 nov 28 16:27 /usr/lib/x86_64-linux-gnu/libPostscript.so -> root5.34/libPostscript.so

Well, you could try to install and then purge everything again:
sudo apt-get install libroot-math-physics5.34 libroot-math-physics-dev libroot-graf2d-postscript5.34 libroot-graf2d-postscript-dev
sudo apt-get purge root-system* root-plugin* libroot*
Afterwards you should get an empty list when you try:
sudo dpkg --list “*”|grep libroot

Now the root5.34 directory is gone, and I do have the empty list! I still have the root directory, but I think it’s ok because it simply contains files extracted from root.**.tar. Should the past versions of root on my machine have been deleted now? What shall I do to install root in the proper way ?

Tomorrow I’ll try to install root again, following what has been said in those topics and what’s said in the guide.
Actually I still have the root directroy, should I delete it? (In this case, rmdir root it’s unsuccessful. What should I do?)
My last question is: which installation method should be preferred?

Following those instructions I was able to install root successfully. Now, when I try to compile using root-config --cflags --glibs I don’t get any error.
Though there is a problem: when I try to run root (typing root) I get:

The program 'root' is currently not installed. You can install it by typing: sudo apt-get install root-system-bin unless I go in v5-34-00-patches directory and do . bin/thisroot.sh; after this I can run root without any problem. How can I make permanent this installation?

Completely solved!
I had to follow these instructions to config and make root:

[quote=“Wile E. Coyote”]

https://root-forum.cern.ch/t/trouble-installing/18046/11[/quote]
Then, to avoid the .bin/thisroot.sh problem after any reboot (or new session) I followed what has been said here: ROOT uninstalls on reboot - #6 by Wile_E_Coyote
(It was sufficient to add source /(this first slash is foundamental)FULL/PATH/TO/YOUR/ROOT/bin/thisroot.sh to my .bashrc)

Thank you Wile E. Coyote, your help was really appreciated!