【发布时间】:2011-12-24 11:08:55
【问题描述】:
安装rvm后,使用如下:
$ curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer > rvm-installer
$ bash rvm-installer
我按照 rvm 网站的建议做了以下操作:
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
$ source .bash_profile
-sh: is_a_function: command not found
当我查看安装输出时,我看到在安装过程中也报告了这个错误(虽然我也看到:“将 RVM 安装到 /Users//.rvm/ 已完成。”)
我查看了 rvm 脚本,并且能够在实用程序脚本中看到函数 is_a_function。
请告知我现在需要做什么来解决这个问题。
P.S.:我不得不在本地下载安装程序,因为我不断收到以下错误:
$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
-sh: syntax error near unexpected token `<'
【问题讨论】:
-
"Installation of RVM to /Users//.rvm/ is complete."行看起来有点不对劲。 rvm 实际安装在哪里?您应该将[[ -s "$HOME/.rvm/scripts/rvm"...位添加到您的 .bashrc 文件中(这样每次启动 BASH 时都会调用它,而不必从命令行显式调用它)。 -
嗨迈克尔,感谢您的回复。它实际上给出了输出:/Users/[my_user_name]/.rvm/ 不知道为什么会被删除。如 rvm 注释中所述,我将这些行添加到 .bash.profile 中。 (见命令行的右端)我认为问题不在于命令的目的地。这是关于函数 is_a_function() 的可用性。