# Missing Canvas

**URL:** <https://root-forum.cern.ch/t/missing-canvas/17664>\
**Category:** ROOT\
**Created:** [May 21, 2014, 4:24pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664 "2014-05-21T16:24:26Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 4:24pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/1 "2014-05-21T16:24:26Z")

</div>

Hi

We installed Root 5.34 on a brand new Debian Wheezy 64-bit machine and compilation went well. Root is running and we are able to read and write Root files. However, the graphic display is not working when we try to pull up a tree browser or make canvases.

The command "TCanvas \*c1 = new TCanvas(“c1”,“Root Canvas 1”) returns the warning:

```
                 Warning in <TCanvas::ResizePad>: c1 width changed from 0 to 10

                 Warning in <TCanvas::ResizePad>: c1 height changed from 0 to 10

```

No Canvas is drawn but no errors are given either. The splash screen appears on startup and we are not loading root in batch mode (“root -b”). Thanks for any suggestions …

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 21, 2014, 4:30pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/2 "2014-05-21T16:30:31Z")

</div>

The usual reason is the nonexistent / improper ROOT’s “etcdir” (search the forum for the word “etcdir”).

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 4:51pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/3 "2014-05-21T16:51:53Z")

</div>

Hi!

“root-config --etcdir” returns /usr/local/root/etc. Should I rebuild again and set it to --etcdir=/usr/local/etc/root?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 21, 2014, 5:01pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/4 "2014-05-21T17:01:06Z")

</div>

See if the “/usr/local/root/etc” subdirectory exists and, if yes, that it contains your ROOT version specific files (it may be that it contains files from another ROOT version).

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 5:23pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/5 "2014-05-21T17:23:12Z")

</div>

The directory does exist and to my knowledge contains the correct ROOT version specific files. I don’t think it is possible for the files to be from another version since there was no previous installation beforehand and the dates of all the files listed match either the date of the version release (Mar 14) or the date of installation (May 15).

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 21, 2014, 5:31pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/6 "2014-05-21T17:31:03Z")

</div>

I think Debian provides its own ROOT version -\> can it be that you have some Debian’s ROOT related packages installed?

Try something like (check the output and pay attention to all “absolute paths” reported):

echo ${ROOTSYS}

which root-config  
type root-config  
root-config --etcdir  
root-config --prefix  
root-config --exec-prefix  
root-config --bindir  
root-config --libdir

which root  
type root  
which root.exe  
type root.exe  
ldd `root-config --bindir`/root  
ldd `root-config --bindir`/root.exe  
ldd `root-config --libdir`/libCore.so  
ldd `root-config --libdir`/libRint.so  
ldd `root-config --libdir`/libCint.so

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 6:06pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/7 "2014-05-21T18:06:48Z")

</div>

Here is the output for the commands you listed:

analysis@analysis-lenovo-520s:~$ echo $ROOTSYS  
/usr/local/root  
analysis@analysis-lenovo-520s:~$ which root-config  
/usr/local/root/bin/root-config  
analysis@analysis-lenovo-520s:~$ type root-config  
root-config is /usr/local/root/bin/root-config  
analysis@analysis-lenovo-520s:~$ root-config --etcdir  
/usr/local/root/etc  
analysis@analysis-lenovo-520s:~$ root-config --prefix  
/usr/local/root  
analysis@analysis-lenovo-520s:~$ root-config --exec-prefix  
/usr/local/root  
analysis@analysis-lenovo-520s:~$ root-config --bindir  
/usr/local/root/bin  
analysis@analysis-lenovo-520s:~$ root-config --libdir  
/usr/local/root/lib  
analysis@analysis-lenovo-520s:~$ which root  
/usr/local/root/bin/root  
analysis@analysis-lenovo-520s:~$ type root  
root is aliased to `root -l’  
analysis@analysis-lenovo-520s:~$ which root.exe  
/usr/local/root/bin/root.exe  
analysis@analysis-lenovo-520s:~$ type root.exe  
root.exe is /usr/local/root/bin/root.exe  
analysis@analysis-lenovo-520s:~$ ldd /usr/local/root/bin/root  
linux-vdso.so.1 =\> (0x00007fff65bff000)  
libXpm.so.4 =\> /usr/lib/x86\_64-linux-gnu/libXpm.so.4 (0x00007f6c6ab9e000)  
libX11.so.6 =\> /usr/lib/x86\_64-linux-gnu/libX11.so.6 (0x00007f6c6a863000)  
libstdc++.so.6 =\> /usr/lib/x86\_64-linux-gnu/libstdc++.so.6 (0x00007f6c6a55b000)  
libc.so.6 =\> /lib/x86\_64-linux-gnu/libc.so.6 (0x00007f6c6a1d0000)  
libxcb.so.1 =\> /usr/lib/x86\_64-linux-gnu/libxcb.so.1 (0x00007f6c69fb0000)  
libdl.so.2 =\> /lib/x86\_64-linux-gnu/libdl.so.2 (0x00007f6c69dab000)  
libm.so.6 =\> /lib/x86\_64-linux-gnu/libm.so.6 (0x00007f6c69b29000)  
/lib64/ld-linux-x86-64.so.2 (0x00007f6c6adc6000)  
libgcc\_s.so.1 =\> /lib/x86\_64-linux-gnu/libgcc\_s.so.1 (0x00007f6c69913000)  
libXau.so.6 =\> /usr/lib/x86\_64-linux-gnu/libXau.so.6 (0x00007f6c6970f000)  
libXdmcp.so.6 =\> /usr/lib/x86\_64-linux-gnu/libXdmcp.so.6 (0x00007f6c6950a000)  
analysis@analysis-lenovo-520s:~$ ldd /usr/local/root/bin/root.exe  
linux-vdso.so.1 =\> (0x00007fff523ff000)  
libCore.so.5.34 =\> /usr/local/root/lib/libCore.so.5.34 (0x00007f60d263f000)  
libRint.so.5.34 =\> /usr/local/root/lib/libRint.so.5.34 (0x00007f60d240a000)  
libstdc++.so.6 =\> /usr/lib/x86\_64-linux-gnu/libstdc++.so.6 (0x00007f60d20ed000)  
libgcc\_s.so.1 =\> /lib/x86\_64-linux-gnu/libgcc\_s.so.1 (0x00007f60d1ed7000)  
libpthread.so.0 =\> /lib/x86\_64-linux-gnu/libpthread.so.0 (0x00007f60d1cbb000)  
libc.so.6 =\> /lib/x86\_64-linux-gnu/libc.so.6 (0x00007f60d192f000)  
libz.so.1 =\> /lib/x86\_64-linux-gnu/libz.so.1 (0x00007f60d1718000)  
libpcre.so.3 =\> /lib/x86\_64-linux-gnu/libpcre.so.3 (0x00007f60d14db000)  
libCint.so.5.34 =\> /usr/local/root/lib/libCint.so.5.34 (0x00007f60d0b58000)  
libdl.so.2 =\> /lib/x86\_64-linux-gnu/libdl.so.2 (0x00007f60d0954000)  
libm.so.6 =\> /lib/x86\_64-linux-gnu/libm.so.6 (0x00007f60d06d2000)  
/lib64/ld-linux-x86-64.so.2 (0x00007f60d3020000)  
analysis@analysis-lenovo-520s:~$ ldd /usr/local/root/lib/libCore.so  
linux-vdso.so.1 =\> (0x00007fff95db8000)  
libz.so.1 =\> /lib/x86\_64-linux-gnu/libz.so.1 (0x00007f6242f82000)  
libpcre.so.3 =\> /lib/x86\_64-linux-gnu/libpcre.so.3 (0x00007f6242d45000)  
libCint.so.5.34 =\> /usr/local/root/lib/libCint.so.5.34 (0x00007f62423c2000)  
libdl.so.2 =\> /lib/x86\_64-linux-gnu/libdl.so.2 (0x00007f62421be000)  
libstdc++.so.6 =\> /usr/lib/x86\_64-linux-gnu/libstdc++.so.6 (0x00007f6241eb7000)  
libm.so.6 =\> /lib/x86\_64-linux-gnu/libm.so.6 (0x00007f6241c34000)  
libgcc\_s.so.1 =\> /lib/x86\_64-linux-gnu/libgcc\_s.so.1 (0x00007f6241a1e000)  
libc.so.6 =\> /lib/x86\_64-linux-gnu/libc.so.6 (0x00007f6241693000)  
/lib64/ld-linux-x86-64.so.2 (0x00007f6243b8f000)  
analysis@analysis-lenovo-520s:~$ ldd /usr/local/root/lib/libRint.so  
linux-vdso.so.1 =\> (0x00007fff75bdc000)  
libCore.so.5.34 =\> /usr/local/root/lib/libCore.so.5.34 (0x00007f9dfb577000)  
libCint.so.5.34 =\> /usr/local/root/lib/libCint.so.5.34 (0x00007f9dfabf5000)  
libstdc++.so.6 =\> /usr/lib/x86\_64-linux-gnu/libstdc++.so.6 (0x00007f9dfa8d8000)  
libgcc\_s.so.1 =\> /lib/x86\_64-linux-gnu/libgcc\_s.so.1 (0x00007f9dfa6c2000)  
libc.so.6 =\> /lib/x86\_64-linux-gnu/libc.so.6 (0x00007f9dfa337000)  
libz.so.1 =\> /lib/x86\_64-linux-gnu/libz.so.1 (0x00007f9dfa11f000)  
libpcre.so.3 =\> /lib/x86\_64-linux-gnu/libpcre.so.3 (0x00007f9df9ee2000)  
libdl.so.2 =\> /lib/x86\_64-linux-gnu/libdl.so.2 (0x00007f9df9cde000)  
libm.so.6 =\> /lib/x86\_64-linux-gnu/libm.so.6 (0x00007f9df9a5b000)  
/lib64/ld-linux-x86-64.so.2 (0x00007f9dfc18d000)  
analysis@analysis-lenovo-520s:~$ ldd /usr/local/root/lib/libCint.so  
linux-vdso.so.1 =\> (0x00007fffbefa3000)  
libdl.so.2 =\> /lib/x86\_64-linux-gnu/libdl.so.2 (0x00007f79981dc000)  
libstdc++.so.6 =\> /usr/lib/x86\_64-linux-gnu/libstdc++.so.6 (0x00007f7997ed5000)  
libm.so.6 =\> /lib/x86\_64-linux-gnu/libm.so.6 (0x00007f7997c52000)  
libgcc\_s.so.1 =\> /lib/x86\_64-linux-gnu/libgcc\_s.so.1 (0x00007f7997a3c000)  
libc.so.6 =\> /lib/x86\_64-linux-gnu/libc.so.6 (0x00007f79976b1000)  
/lib64/ld-linux-x86-64.so.2 (0x00007f7998d79000)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 21, 2014, 6:26pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/8 "2014-05-21T18:26:19Z")

</div>

I see nothing wrong in your output.

Can it be that you have “${HOME}/.rootrc” and/or “./.rootrc” and/or “rootlogon.C”? Try to run “root -n” and see if you still get the TCanvas problem.

I’m afraid, for the moment I have no further idea, sorry.

Try to post the output of:  
root-config --version  
root-config --arch  
root-config --platform  
root-config --features  
root-config --config

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 6:55pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/9 "2014-05-21T18:55:52Z")

</div>

I do have ~/.rootrc and rootlogon.C is under customize\_root/ and .rootrc knows where to find it. When I run “root -n” I get an error involving TVirtualStreamerInfo:

Fatal in TVirtualStreamerInfo::Factory: Cannot find the plugin handler for TVirtualStreamerInfo! However $ROOTSYS/etc/plugins/TVirtualStreamerInfo is accessible, Check the content of this directory!

with a bunch of “Generating Stack Trace…” code afterwards and then the ROOT command line.  
I previously put a line in rootlogon.C that took care of this error but the “-n” seems to be ignoring it.

The output you requested is here:

analysis@analysis-lenovo-520s:~/analysis-10023/n2analysis$ root-config --version  
5.34/18  
analysis@analysis-lenovo-520s:~/analysis-10023/n2analysis$ root-config --arch  
linuxx8664gcc  
analysis@analysis-lenovo-520s:~/analysis-10023/n2analysis$ root-config --platform  
linux  
analysis@analysis-lenovo-520s:~/analysis-10023/n2analysis$ root-config --features  
asimage astiff builtin\_afterimage builtin\_lzma cintex explicitlink fftw3 fitsio gviz genvector krb5 ldap mathmore memstat mysql opengl python reflex shadowpw shared soversion ssl tmva vdt x11 xft xml thread  
analysis@analysis-lenovo-520s:~/analysis-10023/n2analysis$ root-config --config  
–enable-soversion

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 7:07pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/10 "2014-05-21T19:07:21Z")

</div>

Sorry, I just realized I didn’t fully answer your initial question. After loading “root -n” I get no errors, just the Root command line, and still have the TCanvas problem. If I try “root -n” with a call to load in a data file I get the TVirtualStreamerInfo error I described before and it exits ROOT automatically.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 21, 2014, 7:10pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/11 "2014-05-21T19:10:01Z")

</div>

It seems to me that you’ve got something in your “.rootrc” and/or “rootlogon.C” which creates problems.  
Actually, “root -n” should disable the execution of logon and logoff macros, but just to make sure … remove (rename) your “${HOME}/.rootc”, then “cd” to any subdirectory in which there are NO “./.rootrc” nor “./rootlogon.C” and then try to run “root” (you should get NO errors).

One more thing … how exactly did you build and install your ROOT (I mean all command lines that you used)?

Try to run (there should be just one shared library and one rootmap …):  
locate libCore

I’ve found an old thread with a similar problem: [X11 problem](https://root-forum.cern.ch/t/x11-problem/16276/1)

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 7:35pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/12 "2014-05-21T19:35:37Z")

</div>

I renamed both ~/.rootrc and customize\_root/rootlogon.C and ran root and got NO errors just like you said 🙂 I was even able to get a TBrowser up! 😃 It wasn’t able to pull in the libraries to run a data file however, which I am assuming is controlled by /.rootrc and therefore makes sense.

To build and install ROOT I followed the instructions on [root.cern.ch/drupal/content/inst … oot-source](http://root.cern.ch/drupal/content/installing-root-source) for Fixed Location Installation. I made sure I had all the prerequisite packages installed beforehand and used:

./configure --prefix=/usr/local --enable-soversion --enable-shared --enable-opengl --with-gsl-incdir=/usr/include  
–with-gsl-libdir=/usr/lib  
make  
sudo /sbin/make install  
ldconfig

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 21, 2014, 7:43pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/13 "2014-05-21T19:43:10Z")

</div>

I think I see a problem … when you set “–prefix=/usr/local” and you do not set “–etcdir” then your ROOT related executables should be in “/usr/local/bin” and your ROOT’s “etcdir” should be “/etc/root”. How come you’ve got “root[.exe]” in “/usr/local/root/bin” and your ROOT’s “etcdir” is “/usr/local/root/etc”?

You should use something like “–prefix=/usr/local/root --etcdir=/usr/local/root/etc” or “–prefix=/usr/local --etcdir=/usr/local/etc/root” (but putting ROOT in “/usr/local/[bin|lib]” is not really a good idea).  
And of course, the “destination” subdirectories must not be the same as the ones in which you build ROOT.

Also, before running “configure”, make sure that you:  
unset ROOTSYS

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 8:25pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/14 "2014-05-21T20:25:51Z")

</div>

I’m not exactly sure about the filepath differences except that maybe when we ran make install it put the files in the right places? The files are located in both filepaths…

We went through our ~/.rootrc file and realized we were using a file meant for a previous distribution of ROOT that was archived on a CVS that we use for our research group to integrate ROOT with our local libraries. We replaced it with the system.rootrc in /etc/root/ and added our local library references and now it works! 😃

We may be back in touch with you but thank you so so so much for your help!!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 21, 2014, 8:38pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/15 "2014-05-21T20:38:21Z")

</div>

If you have similar ROOT related files in both places (e.g. “/etc/root” and “/usr/local/root/etc”, “/usr/local/bin” and “/usr/local/root/bin”, “/usr/local/lib” and “/usr/local/root/lib”), that means that you have two separate independent ROOT installations. You’d better get rid of one of them, especially the one that resides in “/usr/local/[bin|lib]”.

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 21, 2014, 11:17pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/16 "2014-05-21T23:17:25Z")

</div>

Oh dear…

Can you clarify: do you mean the ROOT executables should not be in /usr/local/(bin or lib), or that the ROOT distribution directories shouldn’t be there?

I went into both file paths and I can run ./root just fine in both. Can you tell if it will be a big problem later on if I don’t remove one of them?

I’m thinking it might be better if I just completely remove ROOT altogether and rebuild from scratch the right way. What would be the best way to uninstall ROOT?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 22, 2014, 7:40am UTC](https://root-forum.cern.ch/t/missing-canvas/17664/17 "2014-05-22T07:40:39Z")

</div>

Honestly speaking, sooner or later, you will learn by hard that the policy of using a “system-provided” ROOT version (e.g. in “`/usr/[bin|lib]`” or “`/usr/local/[bin|lib]`”) is a dead end.  
You will learn that you need something like three different versions of ROOT - just because something that works with a particular ROOT version is not working with another ones, or because some piece of your additional, experiment / analysis specific, software explicitly requires a particular ROOT version.  
The safest approach is to “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) and [install all needed versions of ROOT from scratch, each version in a different “version specific” `ROOTSYS` subdirectory (e.g. something like “`/opt/ROOT/v5-32-04`”, “`/opt/ROOT/v5-34-18`”, “`/opt/ROOT/v5-34-00-patches`” and so on)](https://root-forum.cern.ch/t/sourcing-root-for-all-users/25885/4).

I always install ROOT 5 using the [`ROOTSYS` based method described in this old post](https://root-forum.cern.ch/t/installing-root-from-source/13647/1).  
The [`ROOTSYS` based method](https://root-forum.cern.ch/t/installing-root-from-source/13647/1) is almost the same as the official “[Location independent installation](https://root.cern.ch/build-root-old-method)” method (do remember to “`unset ROOTSYS`” before running `configure` and `make`, if you want to use the official method) but the “`ROOTSYS=/Where/You/Want/To/Install/root`” subdirectory must be different from the “`/Where/You/Unpacked/The/Source/Code/Of/root`” subdirectory (i.e. in which you will build ROOT 5).  
[You can also easily build ROOT 5 “in-place” (with “`unset ROOTSYS`”).](https://root-forum.cern.ch/t/trouble-installing/18046/11)  
If you prefer to use the “`--prefix`” method (i.e. the official “[Fixed location installation](https://root.cern.ch/build-root-old-method)” method), do always remember to add an appropriate “`--etcdir`” (no need to do it for ROOT 6) and do remember to “`unset ROOTSYS`” before running `configure` and `make`.  
Note that the “`--prefix`” method produces a different “installation” / “binary distribution” subdirectory structure than the [`ROOTSYS` based method](https://root-forum.cern.ch/t/installing-root-from-source/13647/1) and I have had problems with ROOT’s tutorials (and tests?) when using the “`--prefix`” method which never appeared when using the [`ROOTSYS` based method](https://root-forum.cern.ch/t/installing-root-from-source/13647/1) (and that’s why I always advertise the [`ROOTSYS` based method](https://root-forum.cern.ch/t/installing-root-from-source/13647/1)).

[Building ROOT 6 requires the usage of the new CMake based building method](https://root.cern.ch/building-root).

Before trying to build ROOT, see the “[Build Prerequisites](http://root.cern.ch/drupal/content/build-prerequisites)” web page.  
In any case, when you are building a new ROOT version, make always sure that nothing in your environment variables (i.e. “`ROOTSYS`”, “`PATH`”, “`LD_LIBRARY_PATH`”) points to another existing version of ROOT (and that’s another good reason why there should be no ROOT related files in “standard” system locations, like “`/usr/[bin|lib]`” or “`/usr/local/[bin|lib]`”), otherwise you may end up with a broken build. If you are re-building a particular version, remove the old “installation” / “binary distribution” subdirectory structure before configuring it again (and if you want to re-configure it, make sure that you started with a “fresh” source code, so that there are no remnants from previous builds, for example run “`make distclean`” or maybe better “`make maintainer-clean`” before configuring it again).

BTW. See also: [Sourcing root for all users](https://root-forum.cern.ch/t/sourcing-root-for-all-users/25885)

P.S. In order to get rid of “undesired” ROOT versions, if you did “`make install`”, with ROOT 5 just “`make uninstall`”, while with ROOT 6, from the build subdirectory, you will need to execute something like “`xargs rm < install_manifest.txt`”. If it comes from your operating system’s repositories, just “completely remove” / “purge” (i.e. “remove with any associated configuration files”) all ROOT related packages. For example, on Ubuntu 14.04, execute “`sudo apt-get purge root-system* root-plugin* libroot*`” (afterwards check that the “`/usr/lib/i386-linux-gnu/root5.34`” and the “`/usr/lib/x86_64-linux-gnu/root5.34`” subdirectories disappeared completely).

---

<div class="post-metadata">

**Author:** ![Westmont\_Nuclear](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/westmont_nuclear/32/34015_2.png) [@Westmont\_Nuclear](https://root-forum.cern.ch/u/Westmont_Nuclear)\
**Post date:** [May 22, 2014, 4:32pm UTC](https://root-forum.cern.ch/t/missing-canvas/17664/18 "2014-05-22T16:32:37Z")

</div>

Ok, thank you so much! That’s really good to know. It’s unfortunate that I didn’t know about the old-fashioned method that you described before I went about doing this. I wonder if it’s posted somewhere and I just missed it somehow? Anyways, thank you so much for all your help! 🙂

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [March 31, 2015, 6:40am UTC](https://root-forum.cern.ch/t/missing-canvas/17664/19 "2015-03-31T06:40:59Z")

</div>

Great post, Wile!

Axel.
