Reputation: 28329
I have accession to universities server: Red Hat Enterprise Linux release 6.2.
My work is to test various scientific analysis programs.
I have no problem untar'ing and running them in my local directory. But most of them have lots of dependencies (perl libraries, RE2, GNU SL, glibc.i686 ) - whenever I try to install those dependencies I come up with the permission problem.
All of those packages require root to install.
Is there a way how can I install various different packages only in my local directory without asking root to install them system wide?
Upvotes: 0
Views: 655
Reputation: 363547
Yes, but the procedure varies per package. Many modern Unix packages have a configure
script that you must run, which takes a --prefix
option + argument specifying where the package should be installed. A directory such as $HOME/pkg
would be a good options for these. Other configuration/building/installation scripts have similar options.
When building a package with dependencies, make sure you have $HOME/pkg/bin
in your PATH
, $HOME/pkg/lib
in your LD_LIBRARY_PATH
and pass -I$HOME/pkg/include
and -L$HOME/pkg/lib
to the compiler and linker, respectively. E.g., put the following in your shell startup file (.bashrc
for Bash):
PATH=$HOME/pkg/bin:$PATH
CFLAGS=-I$HOME/pkg/include
LDFLAGS=-L$HOME/pkg/lib
LD_LIBRARY_PATH=$HOME/pkg/lib
(You shouldn't have to install glibc, ever.)
Upvotes: 2