Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In general I follow the following workflow when I build any program (e.g. emacs, tmux, etc.)

/home/opt/[name of the program]/builds/[version]/

bin
lib
share

For example for a program like tmux I have the following:

/my_local_opt/tmux/builds/1.7.-227/

bin
lib
share

I then create sym links in /home/bin/ pointing to the the specific builds that I have, and I never have to touch my PATH variable, since I fix it to include /home/bin.

E.g. For the example above, I would

  • Create a sym link: from: /home/bin/tmux to: /my_local_opt/tmux/builds/1.7.-227/bin/tmux
  • Have PATH only include /home/bin

However, I am not sure I can follow a similar approach for the man (MANPATH) and lib (LD_LIBRARY_PATH) paths.

  1. For example, after I build tmux I notice that it creates:

    .. /share/man/man1/tmux.1

    so I tried creating a symlink to this file from a place like /home/share and then fixing MANPATH to include this path. But when I typed man tmux it didn't work (it said "No manual entry for tmux"). Why?

  2. How about lib? I thought I could perhaps fix LD_LIBRARY_PATH to a specific directory for each program, and then use sym links to control which version gets included. Would this be a good idea?

More generally, is it a good idea to manage versions in a system using sym links? In the long run I am hoping to leave the sym links in a git repository to keep track of multiple configurations.

In case it helps, I don't have admin privileges in the machine where I build software, so I am hoping to use this as a way easily organize and manage my builds (without having to constantly edit my environment variables holding paths)

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.