ryah ([info]four) wrote,
@ 2009-06-16 13:44:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
tip
Software you work with is best installed in your home directory. I install them in ~/local/software_name-version. This is usually done with a command like

./configure --prefix=$HOME/local/ruby-1.9.1

The advantage of this is that one can have many versions installed at once. (For example, many versions of Ruby.) Also, the software can be uninstalled with a simple rm -rf ~/local/ruby-1.9.1. The disadvantage is that you have many bin/ and lib/ directories and it's a pain to maintain the $PATH. To handle this, do the following in your .zshenv (or .bashrc or whatever)
for i in $HOME/local/*; do
  [ -d $i/bin ] && PATH="${i}/bin:${PATH}"
  [ -d $i/include ] && CPATH="${i}/include:${CPATH}"
  [ -d $i/lib ] && LD_LIBRARY_PATH="${i}/lib:${LD_LIBRARY_PATH}"
  [ -d $i/lib/pkgconfig ] && PKG_CONFIG_PATH="${i}/lib/pkgconfig:${PKG_CONFIG_PATH}"
  [ -d $i/share/man ] && MANPATH="${i}/share/man:${MANPATH}"
done



(3 comments) - (Post a new comment)

Agreed
[info]Marcin Kaszynski [marcinkaszynski.com]
2009-06-16 02:26 pm UTC (link)
Although for me it was not enough -- I work on different projects, sometimes using different versions of the same tools of libraries. I found it even better to use something like virtualenv and have a separate environment for each project.

(Reply to this)


[info]evan
2009-06-16 03:11 pm UTC (link)
Sounds like http://www.gnu.org/software/stow/ a bit

(Reply to this)


[info]thefowle
2009-06-16 05:07 pm UTC (link)
Nice. I've had a ~/.local for ages that I use similarly, except I've kept a ~/.local/bin ~/.local/lib and ~/.local/include that I dutifully go around symlinking new installs into. Its not a very pleasant experience; your script to setup the env to find all the items in ~/.local is much easier to use.

(Reply to this)


(3 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…