# Problems installing root with --prefix=$HOME/.local

**URL:** <https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683>\
**Category:** ROOT\
**Created:** [August 1, 2012, 6:12pm UTC](https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683 "2012-08-01T18:12:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![findlay](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/ee59a6/32.png) [@findlay](https://root-forum.cern.ch/u/findlay)\
**Post date:** [August 1, 2012, 6:12pm UTC](https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683/1 "2012-08-01T18:12:32Z")

</div>

I am trying to install root 5.34/00 on ubuntu 12.04 into $HOME/.local. I have set $ROOTSYS to $HOME/.local, and $LD\_LIBRARY\_PATH to include $ROOTSYS/lib. I believe I have followed all instructions [here](http://root.cern.ch/drupal/content/installing-root-source) relevant to installing into a ‘–prefix’ location.

This is my build sequence:

```auto
~/Documents/work/CERN/root $ echo $ROOTSYS ; echo $LD_LIBRARY_PATH 
/home/justin/.local
/home/justin/.local/lib:/lib
~/Documents/work/CERN/root $ ./configure --prefix=${ROOTSYS} --etcdir=${ROOTSYS}/etc --enable-rpath --enable-soversion --enable-explicitlink --enable-python
~/Documents/work/CERN/root $ make all install
```

And here is what happens when I try to run root:

```auto
~/Documents/work/CERN/root $ which root
/home/justin/.local/bin/root
~/Documents/work/CERN/root $ root
rootx xpm error: XpmOpenFailed
root: can't start ROOT -- check that ${ROOTSYS}/bin/root.exe exists!
~/Documents/work/CERN/root $ ls ${ROOTSYS}/bin/root.exe
/home/justin/.local/bin/root.exe
~/Documents/work/CERN/root $ root.exe
...
Error: cannot open file "iostream" (tmpfile):2:
***Interpreter error recovered***
Error: cannot open file "bits/predefs.h" /usr/include/features.h:325:
***Interpreter error recovered***
root [0]
```

I’ve created the file /etc/ld.so.conf.d/root.conf with contents

```auto
/home/justin/.local/lib
```

and run `sudo ldconfig` without fixing any of the above problems, of which there are 3 or 4:  
[ul]  
[_]‘rootx xpm error: XpmOpenFailed’ when running `root`[/_]  
[_][/home/justin/.local/]root can’t find /home/justin/.local/root.exe[/_]  
[_]‘cannot open file “iostream” (tmpfile):2:’ (does it mean /usr/include/c++/4.6/iostream or /home/justin/.local/lib/root/cint/cint/include/iostream)[/_]  
[_]‘cannot open file “bits/predefs.h” /usr/include/features.h:325:’[/_]  
[/ul]

I am uncertain about how to proceed from this point. Thank you for your help.

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [August 1, 2012, 6:49pm UTC](https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683/2 "2012-08-01T18:49:57Z")

</div>

root-config --bindir  
root-config --libdir  
root-config --etcdir  
root-config --help  
Putting “/home/justin/.local/lib” into “/etc/ld.so.conf.d/root.conf” is a crime against the Operating System. ![:mrgreen:](https://root-forum.cern.ch/uploads/default/original/2X/2/2799b3ea86c419a02327c767288415b2a17e6ee1.gif "Mr. Green")  
See also:  
[url][ROOTSYS and linux distribution installation](https://root-forum.cern.ch/t/rootsys-and-linux-distribution-installation/14173/1)  
[url][Release 5.32.03 on Ubuntu 12.04](https://root-forum.cern.ch/t/release-5-32-03-on-ubuntu-12-04/14368/1)

---

<div class="post-metadata">

**Author:** ![findlay](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/ee59a6/32.png) [@findlay](https://root-forum.cern.ch/u/findlay)\
**Post date:** [August 1, 2012, 7:25pm UTC](https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683/3 "2012-08-01T19:25:26Z")

</div>

I don’t understand why you are referencing root-config. I am still unsure as to if or how I have done anything wrong. Since I have already set $ROOTSYS, I suppose I could rebuild and reinstall root using the ‘Pepe method’, since I am still having trouble using the ‘Fons method’ of installation.

> [@Installing ROOT 5 from Source](https://root-forum.cern.ch/t/installing-root-from-source/13647/1):
>
> The [https://root.cern.ch/build-root-old-method](https://root.cern.ch/build-root-old-method) does NOT mention “ROOTSYS” at all. A newcomer has no chance to learn that the following sequence works (the “/Where/I/Unpacked/The/Source/Code/Of/root” subdirectory must be different from the “ROOTSYS=/Where/I/Want/To/Install/root” subdirectory): cd /Where/I/Unpacked/The/Source/Code/Of/root export ROOTSYS=/Where/I/Want/To/Install/root ./configure [\<arch\>] --enable-soversion --all (g)make (g)make install # may need "sudo" The “./configure --help” …

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [August 1, 2012, 7:43pm UTC](https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683/4 "2012-08-01T19:43:35Z")

</div>

1. if you configure ROOT using “–prefix” you should not define ROOTSYS in advance -\> try something like (there should be no need to modify “ld.so.conf” in this case ):

`unset ROOTSYS
./configure --prefix=/usr/local --etcdir=/usr/local/etc/root --enable-explicitlink --enable-rpath --enable-soversion --all
make
sudo make install`

1. see the output of my root-config commands and compare to what you actually set

2. If you use “my installation method”, see also:  
[url][Updating to new Root versions](https://root-forum.cern.ch/t/updating-to-new-root-versions/13817/1)  
[url][Compiling root from source overheats certain computers](https://root-forum.cern.ch/t/compiling-root-from-source-overheats-certain-computers/10647/1)  
[url][Release 5.32.03 on Ubuntu 12.04](https://root-forum.cern.ch/t/release-5-32-03-on-ubuntu-12-04/14368/1)

---

<div class="post-metadata">

**Author:** ![findlay](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/f/ee59a6/32.png) [@findlay](https://root-forum.cern.ch/u/findlay)\
**Post date:** [August 1, 2012, 8:58pm UTC](https://root-forum.cern.ch/t/problems-installing-root-with-prefix-home-local/14683/5 "2012-08-01T20:58:54Z")

</div>

The clue to the solution was hidden in the original statement of the problem:

```auto
root: can't start ROOT -- check that ${ROOTSYS}/bin/root.exe exists!
```

Root’s configure script does not expand variables and expects concrete paths. I realized while looking through `strings $(which root) | less` that the root binary ought not need to expand shell variables either in using its own hard-coded paths, yet configure passed them blithely on. I suppose the reasons configure does not expand shell variables are related to the certainty that if you intend to install a package somewhere specific enough to explicitly name a ‘–prefix’ location, then that location is definite enough to be a definite path.
