由于已经安装了zlib,RHEL7 gem安装失败

时间:2016-10-27 18:44:59

标签: ruby rubygems chef zlib rhel7

我发现了类似的问题,但没有一个能解决这个问题。 RHEL7,ec2实例。我已经安装了yum并且rvm安装了zlib。我还是不能做宝石安装

[root@host ~]# gem install knife-ec2
Building native extensions.  This could take a while...
ERROR:  Error installing knife-ec2:
    ERROR: Failed to build gem native extension.

current directory: /usr/local/share/gems/gems/nokogiri-1.6.8.1/ext/nokogiri
/usr/bin/ruby -r ./siteconf20161027-19541-y7elcv.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.1.0
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You     may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib64
    --with-make-prog

==删除了其余的错误,因为它的标准与不相关==

zlib已通过YUM和RVM安装:

[root@host ~]# rpm -qa | grep zlib
zlib-1.2.7-15.el7.x86_64

日志文件没有说出我能理解的任何内容。我从来没有真正使用Ruby,我只是这样做,以便在Chef中测试一本食谱。

感谢您的帮助。

0 个答案:

没有答案