简体   繁体   English

在Amazon Linux上安装ruby时出错

[英]Errors installing ruby on Amazon Linux

Good Morning, I have problems installing ruby with rvm on an Amazon EC2 instance. 早上好,我在Amazon EC2实例上使用rvm安装ruby时遇到问题。 I'm using capistrano for installations, but I can reproduce this by login via ssh and executing the steps by hand: 我正在使用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

Installing RVM, installing the openssl for ruby package, installing ruby. 安装RVM,安装rubs软件包的openssl,安装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: libtool已安装:

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: 更新:也安装了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

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. 这是Amazon实例的问题。 After installing gcc, taking an image of that instance and reboot, the instance is somehow broken. 安装gcc后,为该实例拍摄映像并重新启动,该实例在某种程度上已损坏。 gcc -v results in no output and the yaml configure script complains about the compiler being unable to produce executables. gcc -v导致没有输出,并且yaml configure脚本抱怨编译器无法生成可执行文件。 When I setup the server step by step by hand, ruby installs. 当我逐步设置服务器时,将安装ruby。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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