在Amazon Linux上安装ruby的错误

时间:2012-08-29 08:14:40

标签: ruby rvm yaml

早上好, 我在Amazon EC2实例上使用rvm安装ruby时遇到问题。我正在使用capistrano进行安装,但我可以通过ssh登录并手动执行步骤来重现这一点:

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

安装RVM,安装openssl for ruby​​包,安装ruby。第三步导致:

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

日志文件的内容是:

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:

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

更新:m4 autoconf automake也已安装:

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

我该如何解决这个问题?上周为什么安装完全相同?任何指针高度赞赏。

1 个答案:

答案 0 :(得分:0)

这是亚马逊实例的问题。安装gcc后,拍摄该实例的图像并重新启动,实例会以某种方式被破坏。 gcc -v导致无输出,yaml configure脚本抱怨编译器无法生成可执行文件。当我逐步设置服务器时,ruby安装。