[英]how to setup bashrc bash_profile
Hi I am newbie to pathvariables. 嗨,我是pathvariables的新手。 I get the
rvm
path as /local/rvm/
when I do locate rvm
. 当我
locate rvm
时,我得到的rvm
路径为/local/rvm/
。 So I assume that its in the /local folder. 所以我假设它在/ local文件夹中。
But when I do the $ rvm
It complaints about the command not found. 但是当我执行
$ rvm
,找不到有关该命令的投诉。 Can you please tell me what the path variable should be if my rvm is installed in /local/ location. 如果我的rvm安装在/ local /位置,请告诉我路径变量应该是什么。
my .bash_profile looks something like this: 我的.bash_profile看起来像这样:
[[ -s "$HOME/local/rvm/scripts/rvm" ]] && source "$HOME/local/rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Thanks 谢谢
EDIT: 编辑:
It doesn't look like this is a path issue. 看起来这不是路径问题。
rvm
is a script that loads a function, and so it does not need to be in your path. rvm
是一个加载函数的脚本,因此它不必位于您的路径中。
You need to find where the actual rvm/scripts
folder resides. 您需要找到实际的
rvm/scripts
文件夹所在的位置。 If it really has ended up in a root-level /local
folder, then you need to edit that .bash_profile line to remove the $HOME
part of both lines... 如果确实位于根目录
/local
文件夹中,则需要编辑.bash_profile行以删除这两行的$HOME
部分...
So I would suggest figuring out where that file actually exists. 因此,我建议弄清楚该文件实际存在的位置。 I think the
locate
command is finding the rvm
directory and not the command itself... 我认为
locate
命令正在查找rvm
目录,而不是命令本身。
Does ls /local/rvm/scripts/
show you the contents of a folder? ls /local/rvm/scripts/
向您显示文件夹的内容?
On the rvm
page , it shows it as being installed in a .rvm
directory of your home directory... 在
rvm
页面上 ,它显示它已安装在.rvm
目录的.rvm
目录中...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.