LoginSignup
20
20

More than 5 years have passed since last update.

Ubuntu 14.04にrbenvでruby2.1.1入れようとして怒られた

Posted at

何が起きたの?

Ubuntu14.04でrbenv使ってRuby2.1.1入れようとしたら怒られた、としか表現できないんですけど。

$ rbenv install 2.1.1
Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/5fe00cda18ca5daeb43762b80c38e06e
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /home/agen/.rbenv/versions/2.1.1

Downloading ruby-2.1.1.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
Installing ruby-2.1.1...

BUILD FAILED

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

Last 10 log lines:
compiling ossl_rand.c
compiling ossl_x509crl.c
compiling ossl_ns_spki.c
compiling ossl_digest.c
compiling ossl_pkey_rsa.c
installing default openssl libraries
linking shared-object openssl.so
make[2]: ディレクトリ `/tmp/ruby-build.20140423151322.1329/ruby-2.1.1/ext/openssl' から出ます
make[1]: ディレクトリ `/tmp/ruby-build.20140423151322.1329/ruby-2.1.1' から出ます
make: *** [build-ext] エラー 2

どうするの?

Build failure on 2.x and solution (related to readline) #526
rbenv fails to install 2.1.0 on ubuntu 14.04 #528

調べたらそれっぽそうなissueがあったので、この通りにやってみた。

$ curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1
Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/5fe00cda18ca5daeb43762b80c38e06e
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /home/agen/.rbenv/versions/2.1.1

Downloading ruby-2.1.1.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
Installing ruby-2.1.1...
patching file ext/readline/readline.c
patching file ext/readline/extconf.rb
patching file ext/readline/extconf.rb
Installed ruby-2.1.1 to /home/agen/.rbenv/versions/2.1.1
$ rbenv global 2.1.1
$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]

とりあえずこれでおk?

20
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
20