我正在将rvm / ruby安装到ubuntu 12.04上,但我遇到了一个问题。
rvm成功安装,但之后当我尝试rvm install ruby
时,我得到了这个输出:
RVM requires 'curl'. Install 'curl' first and try again.
Warning, new version of rvm available '', you are using older version '1.24.7'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
/usr/local/rvm/scripts/functions/utility_system: line 21: awk: command not found
/usr/local/rvm/scripts/functions/utility_system: line 22: dpkg: command not found
/usr/local/rvm/scripts/functions/utility_system: line 191: tr: command not found
/usr/local/rvm/scripts/functions/utility: line 210: head: command not found
/usr/local/rvm/scripts/functions/utility: line 204: sort: command not found
/usr/local/rvm/scripts/functions/utility_system: line 21: awk: command not found
/usr/local/rvm/scripts/functions/utility_system: line 22: dpkg: command not found
/usr/local/rvm/scripts/functions/utility_system: line 191: tr: command not found
/usr/local/rvm/scripts/functions/support: line 248: find: command not found
/usr/local/rvm/scripts/functions/utility_system: line 21: awk: command not found
/usr/local/rvm/scripts/functions/utility_system: line 22: dpkg: command not found
/usr/local/rvm/scripts/functions/utility_system: line 191: tr: command not found
/usr/local/rvm/scripts/functions/utility: line 210: head: command not found
/usr/local/rvm/scripts/functions/utility: line 204: sort: command not found
Searching for binary rubies, this might take some time.
No binary rubies available for: ///ruby-2.0.0-p353.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for .
Requirements support for ruby-2.0.0-p353 is not implemented yet,
report a bug here => https://github.com/wayneeseguin/rvm/issues
Requirements installation failed with status: 1.
问题是,curl已安装:
# curl
curl: try 'curl --help' or 'curl --manual' for more information
我可以运行curl没问题。有什么想法吗?
答案 0 :(得分:5)
如果您尝试在系统范围内安装RVM,首选是使用普通用户(非root用户)进行RVM安装。
$ curl -L get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ rvm requirements
$ rvm install 2.1.3
$ rvm use --default 2.1.3
此外,也许偏离主题,对于prod服务器并替换默认的1.8.7(系统范围),你可以在没有RVM的情况下完成:
$ git clone https://github.com/sstephenson/ruby-build.git
$ cd ruby-build
$ ./install.sh
$ ruby-build 2.1.3 /usr/local