我刚使用以下命令在我的机器上安装了rvm
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
并在我的终端
中得到了这个Installation of RVM to /home/rahul/.rvm/ is complete.
当我转到/home/rahul/.rvm/
时,我能够看到所有必要的文件夹但是当我在终端中给出rvm命令时,我收到此错误
rvm --version
No command 'rvm' found, but there are 19 similar ones
rvm: command not found
我该如何解决?
修改
我还在我的bashrc中添加了以下行
if [[ -n "$PS1" ]]; then
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
fi
答案 0 :(得分:13)
实际上在安装rvm之后,你必须运行脚本。我被困在与你相同的水平,而不是在终端我读到这一行:
“要开始使用RVM,您需要运行source /usr/local/rvm/scripts/rvm
”
所以将此命令(source /usr/local/rvm/scripts/rvm
)放入终端并输入
之后:
type rvm | head -1
rvm is a function (this you will see hopefully)
答案 1 :(得分:8)
您是否重装了shell或打开了一个新的终端窗口?
您是否按照the RVM install page上的诊断,特别是“安装故障排除”部分,检查RVM是否被称为功能?你应该看到这样的东西:
user$ type rvm | head -1
rvm is a function
答案 2 :(得分:4)
您应在[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
中添加~/.bashrc
,然后重新启动终端。
答案 3 :(得分:0)
打开终端转到Edit
&gt; Profile Preferences
点击Title and Command
标签,然后点击Run command as login shell
。