1

我正在尝试在流浪盒 Ubuntu 12.04 上安装 rvm。当我运行 vagrant 脚本时,由于此命令出错,安装会停止:

curl -L https://get.rvm.io | sudo bash -s stable --ruby=$RUBY_VER --auto-dotfiles --verify-downloads 1

这是在 vagrant 脚本中运行的该命令的输出:

Turning on auto dotfiles mode.
Please read and follow further instructions.
Press ENTER to continue.
Downloading RVM from wayneeseguin branch stable

Upgrading the RVM installation in /usr/local/rvm/
source /etc/profile.d/rvm.sh
Upgrade of RVM in /usr/local/rvm/ is complete.

Upgrade Notes:

  * No new notes to display.

# In case of problems:
#        run and read: rvm notes
#           read docs: http://rvm.io/
#          talk to us: http://webchat.freenode.net/?channels=rvm
#     read cheatsheet: http://cheat.errtheblog.com/s/rvm
#    watch screencast: http://screencasts.org/episodes/how-to-use-rvm
#   open a bug report: https://github.com/wayneeseguin/rvm/issues

# vagrant,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and more enjoyable!
!!
#
# ~Wayne

rvm 1.21.6 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <m
papis@gmail.com> [https://rvm.io/]

Searching for binary rubies, this might take some time.
.o binary rubies available for: ubuntu/12.04/i386/ruby-1.9.3-p374
Continuing with compilation. Please read 'rvm help mount' to get more informatio
n on binary rubies.
Installing requirements for ubuntu, might require sudo password.
Requirements installation successful.
, this may take a while depending on your cpu(s)...es/ruby-1.9.3-p374
, this may take a while depending on your connection...
.tar.bz2', it's not possible to validate it.ng.org/pub/ruby/1.9/ruby-1.9.3-p374
This could be because your RVM install's list of versions is out of date. You ma
y want to
update your list of rubies by running 'rvm get stable' and try again.
If that does not resolve the issue and you wish to continue with unverified down
load
add '--verify-downloads 1' after the command.

There has been an error fetching the ruby interpreter. Halting the installation.

但是,当我尝试在 vagrant box 的命令行上运行相同的指令时,它似乎可以工作:

vagrant@precise32:~$ curl -sSL https://get.rvm.io | sudo bash -s stable --ruby=1.9.3-p374 --auto-dotfiles --verify-downloads 1

输出是这样的:

Turning on auto dotfiles mode.
Please read and follow further instructions.
Press ENTER to continue.
Downloading RVM from wayneeseguin branch stable

Upgrading the RVM installation in /usr/local/rvm/

Upgrade of RVM in /usr/local/rvm/ is complete.

Upgrade Notes:

  * No new notes to display.

# In case of problems:
#        run and read: rvm notes
#           read docs: http://rvm.io/
#          talk to us: http://webchat.freenode.net/?channels=rvm
#     read cheatsheet: http://cheat.errtheblog.com/s/rvm
#    watch screencast: http://screencasts.org/episodes/how-to-use-rvm
#   open a bug report: https://github.com/wayneeseguin/rvm/issues

# vagrant,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne


rvm 1.21.6 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

Already installed ruby-1.9.3-p374.
To reinstall use:

    rvm reinstall 1.9.3-p374

Creating alias default for ruby-1.9.3-p374.
Recording alias default for ruby-1.9.3-p374.
Creating default links/files
Saving wrappers to '/usr/local/rvm/bin'........

  * To start using RVM you need to run `source /usr/local/rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

有任何想法吗?我想我可以手动运行关于 vagrant 文件的说明,但这会破坏使用配置的整个目的。提前致谢。

4

1 回答 1

1

没关系。碰巧我的 Git 被配置为自动将行结尾从 Linux 转换为 Windows 格式,所以当我下载 vagrant 文件时,当 Linux 试图从中提取 Ruby 版本(和其他类似的东西)时,它们变得无用。

因此,在我的情况下,解决方案是重新安装 Git,将“配置行结束转换”设置为“按原样结帐,按原样提交”:

安装没有行尾转换的 Git

于 2013-07-08T15:59:32.373 回答