bundle install
在我的 Gemfile (它依赖于 Nokogiri)中使用 Selenium-webdriver ~>2.35.1运行后出现以下错误。
Building native extensions with: '--with-xml2-lib=/usr/lib64 --with-xml2-include=/usr/include/libxml2 --with-xslt-lib=/usr/lib64 --with-xslt-include=/usr/include/libxslt'
This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/local/mxp25/.rbenv/versions/1.9.3-p327/bin/ruby extconf.rb --with-xml2-lib=/usr/lib64 --with-xml2-include=/usr/include/libxml2 --with-xslt-lib=/usr/lib64 --with-xslt-include=/usr/include/libxslt
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-redhat-linux/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-redhat-linux/ports/libxml2/2.8.0/configure.log' to see what happened.
*** 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.
我尝试使用命令行指定 Nokogiri 需要的两个本地库,但这似乎没有帮助。
我也找不到“mkmf.log”文件或“configure.log”文件。
我尝试并能够安装 Nokogiri 1.5.10。