Tag: rubygems

Nokogiri编译错误 – 找不到库/标题

尝试安装gem,但无法找到标题,尽管指定了它们: sudo gem install nokogiri — –with-xml2-lib=/usr/local/lib –with-xml2-include=/usr/local/include/libxml2 –with-xml2-include=/usr/local/include/libxml2 –with-xslt-include=/usr/local/include/libxslt Building native extensions. This could take a while… ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb –with-xml2-lib=/usr/local/lib –with-xml2-include=/usr/local/include/libxml2 –with-xml2-include=/usr/local/include/libxml2 –with-xslt-include=/usr/local/include/libxslt checking for #include … no —– libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. /usr/local/include/libxml2/libxml/parser.h文件确实存在,所以我不明白为什么这不起作用。 编辑:我在Centos 5.4上