y91 y91 - 2 months ago 10
Linux Question

Changing .bashrc after manually installing a tool

I am working off of a cluster and since I do not have sudo privileges there, I had to install a toolkit at a different path

~/bin/tool_kit
. This path now contains the following directories:
bin
,
include
and
lib
. This may be a very newbie question, but what changes do I make to my
.bashrc
so that I am able to use this toolkit.

For example, the
$PATH
variable might be augmented like:
export PATH = ~/bin/tool_kit/bin:$PATH
. How do I include
lib
and
include
?

Answer

bin is the only location you definitely need to do anything with:

# using end of the PATH, unless you know you want to override like-named system binaries
PATH=$PATH:$HOME/bin/tool_kit/bin

No export is needed here, as the PATH variable is already in the environment.


If and only if your software didn't compile in a rpath pointing to the anticipated runtime library locations, you may also wish to set an LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+$LD_LIBRARY_PATH:}$HOME/bi‌​n/tool_kit/lib

include files are used only when compiling other software, and are not generally needed at runtime.