简体   繁体   English

使用rbenv install会引发错误

[英]Using rbenv install throws an error

I'm using Homebrew rbenv. 我正在使用Homebrew rbenv。 brew doctor comes out fine. brew doctor出来很好。 rbenv install 2.0.0-p451 gives the following error message: rbenv install 2.0.0-p451给出以下错误消息:

user$ rbenv install 2.0.0-p451 
Downloading ruby-2.0.0-p451.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/9227787a9636551f1749ee8394b5ffe5
Installing ruby-2.0.0-p451...

BUILD FAILED

Inspect or clean up the working tree at /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245
Results logged to /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245.log

Last 10 log lines:
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
installing default openssl libraries
1 warning generated.
linking shared-object date_core.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
linking shared-object openssl.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/usr/local/var/rbenv/versions/2.0.0-p451/lib'
make: *** [build-ext] Error 2

I tried googling it but not luck. 我试着谷歌搜索但不是运气。 Any tips? 有小费吗?

ps I tried other ruby versions but same issue (although the last 10 lines of the log are slightly different). ps我试过其他ruby版本但问题相同(尽管日志的最后10行略有不同)。

Edit: installing version 1.9.3-p545 works fine. 编辑:安装版本1.9.3-p545工作正常。

brew cleanup and remove this /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245 file. brew cleanup并删除此/var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245文件。

I remember i removed all /var/folders/4h folder (wasn't exactly such name, but then i removed all folders in /var/folders/ and there wasn't no problem). 我记得我删除了所有/var/folders/4h文件夹(不完全是这样的名字,但后来我删除了/var/folders/所有文件夹,并且没有问题)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM