前提・実現したいこと
AWS(Amazon Linux AMI)の環境で、Ruby2.4.1からRuby2.5.5へアップデートしたいのですが、
rbenvでインストールしても、ソースからmakeしても下記エラーが発生します。
どなたか対処方法について、教えて頂けないでしょうか?
※rbenvやmake以外の方法でも構いません。
発生している問題・エラーメッセージ
$ rbenv install 2.5.5
のコマンドを入力すると、以下のエラーが発生します。
Downloading ruby-2.5.5.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.5.tar.bz2 Installing ruby-2.5.5... BUILD FAILED (Amazon Linux AMI 2017.03 using ruby-build 20190314-2-g5a7c1e4) Inspect or clean up the working tree at /tmp/ruby-build.20190318195029.22863 Results logged to /tmp/ruby-build.20190318195029.22863.log Last 10 log lines: compiling ./missing/setproctitle.c compiling ./missing/strlcat.c compiling ./missing/strlcpy.c compiling addr2line.c compiling dmyenc.c linking miniruby /usr/bin/ld: gc.o: relocation R_X86_64_PC32 against undefined symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make: *** [miniruby] Error 1
試したこと
Rubyのバージョンアップをするにあたり、
以下のコマンドを入力しました。
$ yum -y install gcc-c++ openssl-devel git readline-devel
$ mkdir ~/.rbenv
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ mkdir ~/.rbenv/plugins ~/.rbenv/plugins/ruby-build
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ cd ~/.rbenv/plugins/ruby-build
$ ./install.sh
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv install 2.5.5
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/03/27 10:31