Installing and using unix software in userland

From Wikifications
Revision as of 19:39, 30 June 2007 by Dre (Talk | contribs) (page created)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In your shell init file, set the following (for bash / zsh compatible shells):

export LDFLAGS='-L/path/to/your/home/lib'
export CPPFLAGS='-I/path/to/your/home/include'
export PATH='/path/to/your/home:$PATH'
export LD_LIBRARY_PATH=/path/to/your/home/lib
export LD_INCLUDE_PATH=/path/to/your/home/include

Log out / in, so that the above takes effect.

  • Configure any dependencies with --prefix=/path/to/your/home, and make / make install as usual. They will be installed into your home directory (~/lib, ~/include, ~/bin)
  • Configure your desired software with --prefix=/path/to/your/home and make /make install as usual. It should pick up all your new libs / includes due to the environment variables.

When you execute your new binaries, they will be able to find your userland libraries thanks to LD_LIBRARY_PATH.