`

centos yum install nokogiri 1.5.8 不成功的解决方案

阅读更多

centos下安装nokogiri不成功,提示如下:

gem install nokogiri -v 1.5.8

Building native extensions.  This could take a while...

ERROR:  Error installing nokogiri:

        ERROR: Failed to build gem native extension.

 

    /usr/local/rvm/rubies/ruby-1.9.3-p545/bin/ruby extconf.rb

checking for libxml/parser.h... no

-----

libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

-----

*** 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.

 

 

解决方案:

 

yum -y install gcc gcc-c++ zlib-devel openssl-devel readline-devel libxml2 libxml2-devel libxslt libxslt-devel

 

是因为缺少编译环境,解决了:

 

gem install nokogiri -v 1.5.8

Building native extensions.  This could take a while...

Successfully installed nokogiri-1.5.8

Installing ri documentation for nokogiri-1.5.8

 

1 gem installed

 

1
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics