我不知道这里出了什么问题——有什么想法吗?
我在 Ubuntu 8.04 LTS 上运行,并按照以下说明安装了 libxml2 和 libxslt:
http://www.techsww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux.php
http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php
但是,我安装了最新版本:
libxslt-1.1.24
libxml2-2.7.3
安装很顺利
-------------------- 我设置LD_LIBRARY_PATH
---------------------------- ------
回声$LD_LIBRARY_PATH
/usr/local/libxslt/lib:
------------- 似乎该功能存在 - 至少基于字符串的输出 ------------
/usr/local/libxslt/lib$字符串 * | grep ParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
------------------------ 但是编译仍然失败 ---------- ------------------
sudo gem install webrat
构建原生扩展。这可能需要一段时间...
错误:安装 webrat 时出错:
错误:无法构建 gem 原生扩展。
/usr/local/bin/ruby extconf.rb 安装 webrat
检查 /opt/local/include/、/opt/local/include/libxml2、/opt/local/include、/opt/local/include 中的 iconv.h, /opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include /libxml2... 是
检查 /opt/local/include/、/opt/local/include/libxml2、/opt/local/include、/opt/local/include、/opt/local/ 中的 libxml/parser.h包括/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2...是的
检查 /opt/local/include/、/opt/local/include/libxml2、/opt/local/include、/opt/local/include、/opt/local/include/libxml2、/usr 中的 libxslt/xslt.h /local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... 是
检查 libexslt/exslt .h 在 /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include, /usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... 是
检查 xmlParseDoc() 在 -lxml2.. . 是
的,在 -lxslt 中检查 xsltParseStylesheetDoc() ... 没有
缺少 libxslt。尝试“port install libxslt”或“yum install libxslt-devel”
*** extconf.rb failed ***
由于某种原因无法创建 Makefile,可能缺少
必要的库和/或头文件。检查 mkmf.log 文件以获取更多
详细信息。您可能需要配置选项。
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}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-xml2lib
--without-xml2lib
--with-xsltlib
--without-xsltlib
Gem 文件将继续安装在 /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.3.3 以供检查。
结果记录到 /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.3.3/ext/nokogiri/gem_make.out