简体   繁体   English

手动安装工具后更改.bashrc

[英]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 . 我正在使用集群,并且由于那里没有sudo特权,因此我不得不在其他路径~/bin/tool_kit安装工具箱。 This path now contains the following directories: bin , include and lib . 现在,该路径包含以下目录: binincludelib 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. 这可能是一个非常新手的问题,但是我需要对.bashrc进行哪些更改,以便能够使用此工具包。

For example, the $PATH variable might be augmented like: export PATH = ~/bin/tool_kit/bin:$PATH . 例如, $PATH变量可能会增加,例如: export PATH = ~/bin/tool_kit/bin:$PATH How do I include lib and include ? 如何包含libinclude

bin is the only location you definitely need to do anything with: bin是您绝对需要执行任何操作的唯一位置:

# 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. 这里不需要export ,因为PATH变量已经在环境中。


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: 当且仅当您的软件未在指向预期运行时库位置的rpath编译时,您才可能希望设置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. include文件仅在编译其他软件时使用,并且在运行时通常不需要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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