0

我使用的是 Ruby 1.9.3,因此必须使用旧版本的 Nokogiri。我需要安装 Nokogiri v1.5.10。

最初我收到一个错误,即缺少 libxml2。安装 libxml2 后出现以下错误:

ERROR:  Error installing nokogiri-1.5.10.gem:
        ERROR: Failed to build gem native extension.

        /opt/ruby-1.9.3/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... no
-----
libxslt 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.

我是否需要手动安装每个依赖项?

如果是这样,我如何确定要使用的版本?

注意:服务器无法访问互联网。因此,我必须以scprpm 或 tar 文件来安装。

4

1 回答 1

0

不幸的是,您需要使用该版本的 Nokogiri 手动安装每个依赖项,因为我不相信他们在 1.6.0.rc1 版本之前将依赖项打包。

于 2015-06-02T15:12:56.553 回答