简体   繁体   中英

Errors installing ruby on Amazon Linux

Good Morning, I have problems installing ruby with rvm on an Amazon EC2 instance. I'm using capistrano for installations, but I can reproduce this by login via ssh and executing the steps by hand:

export CURL_HOME=${TMPDIR:-${HOME}}/.rvm-curl-config; mkdir ${CURL_HOME}/; { [[ -r ${HOME}/.curlrc ]] && cat ${HOME}/.curlrc; echo \"silent\"; echo \"show-error\"; } > $CURL_HOME/.curlrc ; curl -L get.rvm.io | bash -s stable --path $HOME/.rvm/; rm -rf $CURL_HOME
$HOME/.rvm/bin/rvm pkg install openssl
$HOME/.rvm/bin/rvm install ruby-1.9.3-p194 -j $(cat /proc/cpuinfo | grep vendor_id | wc -l) --with-opensll-dir=$HOME/.rvm/usr

Installing RVM, installing the openssl for ruby package, installing ruby. The third step results in:

Fetching yaml-0.1.4.tar.gz to /home/ec2-user/.rvm/archivesExtracting yaml-0.1.4.tar.gz to /home/ec2-user/.rvm/src
Prepare yaml in /home/ec2-user/.rvm/src/yaml-0.1.4.
Error running 'autoreconf -is --force', please read /home/ec2-user/.rvm/log/ruby-1.9.3-p194/yaml/autoreconf.log

The content of the log file is:

configure.ac:56: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

libtool was installed:

sudo yum install libtool
...
Package libtool-2.2.10-1.8.amzn1.x86_64 already installed and latest version

Update: m4 autoconf automake was installed too:

sudo yum install m4 autoconf automake
... 
Package m4-1.4.13-5.8.amzn1.x86_64 already installed and latest version
Package autoconf-2.63-5.1.7.amzn1.noarch already installed and latest version
Package automake-1.11.1-2.9.amzn1.noarch already installed and latest version
Nothing to do

How do I have to fix this? Why did the very same installation worked last week? Any pointer highly appreciated.

It's a problem with the Amazon instance. After installing gcc, taking an image of that instance and reboot, the instance is somehow broken. gcc -v results in no output and the yaml configure script complains about the compiler being unable to produce executables. When I setup the server step by step by hand, ruby installs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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