简体   繁体   English

rbenv ruby​​安装失败ubuntu

[英]rbenv ruby install fail ubuntu

Here is the error log 这是错误日志

Downloading ruby-2.2.0.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
Installing ruby-2.2.0...

BUILD FAILED (Ubuntu 14.04 using ruby-build 20141225-7-g4aeeac2)

Inspect or clean up the working tree at /tmp/ruby-build.20150106233051.25615 Results logged to /tmp/ruby-build.20150106233051.25615.log

Last 10 log lines:

compiling ossl_x509store.c
compiling ossl_engine.c
compiling ossl_ocsp.c
compiling ossl_config.c
compiling ossl_digest.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: Leaving directory /tmp/ruby-build.20150106233051.25615/ruby-2.2.0/ext/openssl'
make[1]: Leaving directory/tmp/ruby-build.20150106233051.25615/ruby-2.2.0'
make: *** [build-ext] Error 2

I'm not sure what to do here. 我不确定在这里做什么。 I tried this but when I type ruby -v it still tells me I have the old version. 我试过了,但是当我输入ruby -v它仍然告诉我我有旧版本。

sudo apt-get install autoconf bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev 

Thanks for any comments given, much appreciated. 感谢您的任何评论,非常感谢。

首先安装这些依赖项,然后使用rbenv在14.04 for ruby​​ 2.2.0上为我重试

sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

All of other anwsers failed for me... 其他所有人都对我失败了。

and after lot of failed attempts and research I found out those workarounds for many versions: 经过大量失败的尝试和研究,我发现了许多版本的解决方法:

2.1.1 2.1.1

curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1

2.0.0-p451 2.0.0-p451

curl -fsSL https://gist.github.com/LeonB/10503374/raw | rbenv install --patch 2.0.0-p451

2.0.0-p247 2.0.0-p247

cat <(curl -fsSL https://raw.githubusercontent.com/wayneeseguin/rvm/master/patches/ruby/changeset_r45225.diff) <(curl -fsSL https://raw.githubusercontent.com/wayneeseguin/rvm/master/patches/ruby/changeset_r45240.diff) | sed -E 's/^((---|\+\+\+) )(a|b)\/([^ ]+\s+\(revision [0-9]+\))$/\1\4/' | sed '/rl_delete_text/d' | rbenv install -p 2.0.0-p247

Source: https://github.com/sstephenson/ruby-build/issues/526 来源: https//github.com/sstephenson/ruby-build/issues/526

Hope i could help anyone. 希望我能帮助任何人。

If you are using Ubuntu and or Debian than you can try to install libffi-dev via apt-get. 如果您使用的是Ubuntu和/或Debian,则可以尝试通过apt-get安装libffi-dev。

$ apt-get install libffi-dev

I did a little research around the forums and I found this on the official rbenv Question and Answer section. 我在论坛上进行了一些研究,并在官方的rbenv“问答”部分中找到了这一点。

https://github.com/sstephenson/ruby-build/wiki#build-failure-of-fiddle-with-ruby-220 https://github.com/sstephenson/ruby-build/wiki#build-failure-of-fiddle-with-ruby-220

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

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