【问题标题】:RVM fails to clone ruby 1.9.2 head from githubRVM 无法从 github 克隆 ruby​​ 1.9.2 头
【发布时间】:2011-06-27 15:36:24
【问题描述】:

我一直想通过 RVM 安装最新版本的 ruby​​ 1.9.2,但尝试从 github 获取源时失败:

albookpro-3:~ pl$ rvm install 1.9.2-head
Installing Ruby from source to: /Users/pl/.rvm/rubies/ruby-1.9.2-head, this may take a while depending on your cpu(s)...

ruby-1.9.2-head - #fetching 
Cloning from https://github.com/ruby/ruby.git, this may take a while depending on your connection...
Initialized empty Git repository in /Users/pl/.rvm/repos/ruby-1.9.2-head/.git/ shallow over http or ftp not supported
cloning from https://github.com/ruby/ruby.git failed, now attempting to clone from https://github.com/ruby/ruby.git, this may take a while depending on your connection...
Initialized empty Git repository in /Users/pl/.rvm/repos/ruby-1.9.2-head/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
ERROR: There has been an error while trying to fetch the repository.  
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.

查找已知版本时:

albookpro-3:~ pl$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.6-head
[ruby-]1.8.7[-p334]
[ruby-]1.8.7-head
[ruby-]1.9.1-p378
[ruby-]1.9.1[-p431]
[ruby-]1.9.1-head
[ruby-]1.9.2[-p180]
[ruby-]1.9.2-head
ruby-head

...

但是当我获取我现在使用的版本 1.9.2-p180 时它确实有效。

我应该做些什么来完成这项工作? 我正在使用最新的 rvm 版本:

albookpro-3:~ pl$ rvm -v

rvm 1.6.20 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]

谢谢

【问题讨论】:

  • 你有什么版本的git?可能与此有关:github.com/blog/…
  • 我使用的是 1.5.5,确实,升级到 1.7.5.4 似乎可以解决问题。谢谢!

标签: git github rvm head ruby-1.9.2


【解决方案1】:

我在 git 上遇到过类似的问题:

$ git clone https://github.com/davedelong/CHDataStructures.git
Initialized empty Git repository in /home/mg/Downloads/1/CHDataStructures/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
$  git-update-server-info 
fatal: Not a git repository

有趣的是,在同一台计算机上,它在 Ubuntu Hardy 下无法运行,而在 Lucid 下运行。

这就是帮助:

$ git clone git://github.com/davedelong/CHDataStructures.git

(也就是我把 https: 换成 git: 就行了)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-09-25
    • 2021-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多