Skip to content

Instantly share code, notes, and snippets.

@5lx
Created February 14, 2018 23:21
Show Gist options
  • Select an option

  • Save 5lx/78d120d0bfc2b92cd5353aee994b22f8 to your computer and use it in GitHub Desktop.

Select an option

Save 5lx/78d120d0bfc2b92cd5353aee994b22f8 to your computer and use it in GitHub Desktop.
Build Lib/App in home folder

For example, we will install libs/apps under ~/.local/

Prebuild configuring:

./configure --prefix=~/.local/

Add the following lines into .bashrc or .bash_profile:

# Add local bin path
export PATH=$PATH:$HOME/.local/bin

# Add local lib and include path
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/lib
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$HOME/.local/include

# Add local man path
export MANPATH=$MANPATH:$HOME/.local/man;

Create ~/.local/share/config.site

CPPFLAGS=-I$HOME/.local/include
LDFLAGS=-L$HOME/.local/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment