I am installing a program on a server as a non-root user. Specifically it is tmux 1.5, but this should apply broadly to all locally installed program in my opinion (I mention the program name in case this problem ends up not being my own error).
The program requires me to install some dependent libraries (e.g. libevent and ncurses). So, I installed them both locally since I do not have root access
cd $HOME/library/installation/folder
DIR=$HOME/local
./configure --prefix=$DIR
#... make ... make install
Now, to install the program, I also had to include the library packages:
cd $HOME/program/installation/folder
./configure --prefix=$DIR CFLAGS="-I$DIR/include" LDFLAGS="-L$DIR/lib"
#... make ... make install
Ok, so this installs the program without problems into $HOME/local/bin, but if I run the executable: $HOME/local/bin/tmux , I get the following error:
tmux: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
It would seem to me that the program cannot find the desired libraries, but the file libevent-2.0.so.5 does indeed exist in $HOME/local/lib as specified in the configure options. I am wondering how I can get the program to recognize the installed library in order to run. I tried putting symbolic links in $HOME/lib, $HOME/bin, and $HOME/local/bin, but none of these worked. Any ideas and suggested would be greatly appreciated
-R $DIR/lib
toCFLAGS
is while buildingtmux
(and notlibevent
). This did not help me – there was some final error from gcc saying it can't recognize-R
(also, I tried without the space between-R
and$DIR
). ./configure --disable-shared This worked, updating theLD_LIBRARY_PATH
also worked. I ended up makinglibevent
again with the above--disable-shared
option.