Ruby on rails zlib的ruby on EC2安装问题
我读过一篇类似的文章,但我没有使用ubuntu,也没有apt get 仅供参考,uname:x86_64 x86_64 x86_64 GNU/Linux 当尝试执行“gem安装rails”时,我得到 但是,当我执行“yum安装zlib”时,它表示已安装Ruby on rails zlib的ruby on EC2安装问题,ruby-on-rails,amazon-ec2,Ruby On Rails,Amazon Ec2,我读过一篇类似的文章,但我没有使用ubuntu,也没有apt get 仅供参考,uname:x86_64 x86_64 x86_64 GNU/Linux 当尝试执行“gem安装rails”时,我得到 但是,当我执行“yum安装zlib”时,它表示已安装 [root@domU-12-31-39-07-7D-C1 ruby-1.9.2-p136]# yum install zlib Loaded plugins: fastestmirror, security Loading mirror spee
[root@domU-12-31-39-07-7D-C1 ruby-1.9.2-p136]# yum install zlib
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package zlib-1.2.3-24.6.amzn1.x86_64 already installed and latest version
Nothing to do
我尝试了哪个zlib
,并确认它不存在。有什么建议吗
谢谢。是的!我在这里找到了答案: 我只需要他的指令的一个子集,即进入源代码并:
cd ruby-1.9.2-p136/ext/zlib/
ruby extconf.rb --with-zlib-include=/usr/include --width-zlib-lib=/usr/lib
gem install rails --include-dependencies
就这样!感谢卢卡斯;) 前几天我遇到了这个问题,我的解决方案是:“切换到REE”。。。正确安装了gems的,我通过搜索修复了这个错误
--width zlib lib
可能应该是--with zlib
。我不确定@Richard建议的编辑,似乎不太可能,但不知道我不想亲自编辑这篇文章来解决这个问题。
cd ruby-1.9.2-p136/ext/zlib/
ruby extconf.rb --with-zlib-include=/usr/include --width-zlib-lib=/usr/lib
gem install rails --include-dependencies
sudo apt-get install zlib1g-dev
cd /ruby-source-files/ext/zlib
#rvm ~/.rvm/src/ruby-*.*.*/ext/zlib
ruby extconf.rb
make
sudo make install