`rbenv install 2.2.0`出错

时间:2015-01-13 05:44:28

标签: ruby-on-rails ruby ubuntu-14.04 rbenv

尝试Setup Ruby On Rails on Ubuntu 14.04 Trusty Tahr

控制台错误输出:

rbenv install 2.2.0
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 20150112)

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

Last 10 log lines:
compiling ossl_digest.c
compiling ossl_x509name.c
compiling ossl_bio.c
compiling ossl_config.c
compiling ossl_asn1.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: Leaving directory `/tmp/ruby-build.20150113142305.19357/ruby-2.2.0/ext/openssl'
make[1]: Leaving directory `/tmp/ruby-build.20150113142305.19357/ruby-2.2.0'
make: *** [build-ext] Error 2

Log file ruby-build.20150113142305.19357.log.

4 个答案:

答案 0 :(得分:15)

Ruby 2.2.0需要开发版本的libffi,所以这应该有所帮助:

sudo apt-get install libffi-dev

答案 1 :(得分:0)

我尝试过TomášDundáček的回答,但它对我不起作用我必须安装以下才能使其正常工作

sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev

答案 2 :(得分:0)

正如旁注:我遇到rbenv install 2.2.1这个问题(安装libffi-dev解​​决了它),但现在没有2.2.2版本。你应该使用最后一个修补程序版本,这样可以解决问题。我很想知道我是否是唯一一个遇到2.2.1而不是2.2.2问题的人。

答案 3 :(得分:0)

以为我在这里添加了这个,因为错误是相同的,但原因是不同的(OpenSSL)。唯一有用的东西(经过几个小时尝试一堆东西)是uninstalling an old version of OpenSSL和自制软件。