简体   繁体   中英

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM