为什么在Windows 7上Nokogiri编译安装顺利,却总是请求安装失败?

2026-04-11 16:501阅读0评论SEO基础
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计301个文字,预计阅读时间需要2分钟。

为什么在Windows 7上Nokogiri编译安装顺利,却总是请求安装失败?

我正在尝试在64位PC上使用64位版本的Windows、Ruby 2.0.0和DevKit。在Windows 7上,我安装了Nokogiri。刚刚从ftp://ftp.zlatkovic.com/libxml/64bit/安装了xml2、xslt、iconv和zlib库,并将include/libxml2/libxml移动到inc目录。

我正在尝试在64位PC上使用64位版本的 Windows, Ruby 2.0.0和DevKit在Windows 7上使用Nokogiri.我刚刚从 ftp://ftp.zlatkovic.com/libxml/64bit/安装了xml2 / xslt / iconv / zlib库,并将include / libxml2 / libxml移动到include / libxml;我想我可以调整一下–with-xml2-include),然后安装Nokogiri.它似乎构建了本机扩展很好.

当我试图要求Nokogiri时,我得到:

为什么在Windows 7上Nokogiri编译安装顺利,却总是请求安装失败?

C:/Users/echristopherson/Development/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require':LoadError: 126: The specified module could not be found. - C:/Users/echristopherson/Development/Ruby/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.so

当我检查文件类型时:

file C:/Users/echristopherson/Development/Ruby/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.so

它输出:

PE32+ executable for MS Windows (DLL) (console) Mono /.Net assembly.

我究竟做错了什么?我用gem install –pre nokogiri得到了相同的结果….

根据您的输出,我看到您正在使用Ruby 2.0.0. Nokogiri在Windows x64上还没有支持Ruby 2.0.0;根据 Nokogiri issue 864,这是由于 rake-compiler’s current inability (as of May 7, 2013) to target the x64-mingw32 platform.

本文共计301个文字,预计阅读时间需要2分钟。

为什么在Windows 7上Nokogiri编译安装顺利,却总是请求安装失败?

我正在尝试在64位PC上使用64位版本的Windows、Ruby 2.0.0和DevKit。在Windows 7上,我安装了Nokogiri。刚刚从ftp://ftp.zlatkovic.com/libxml/64bit/安装了xml2、xslt、iconv和zlib库,并将include/libxml2/libxml移动到inc目录。

我正在尝试在64位PC上使用64位版本的 Windows, Ruby 2.0.0和DevKit在Windows 7上使用Nokogiri.我刚刚从 ftp://ftp.zlatkovic.com/libxml/64bit/安装了xml2 / xslt / iconv / zlib库,并将include / libxml2 / libxml移动到include / libxml;我想我可以调整一下–with-xml2-include),然后安装Nokogiri.它似乎构建了本机扩展很好.

当我试图要求Nokogiri时,我得到:

为什么在Windows 7上Nokogiri编译安装顺利,却总是请求安装失败?

C:/Users/echristopherson/Development/Ruby/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require':LoadError: 126: The specified module could not be found. - C:/Users/echristopherson/Development/Ruby/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.so

当我检查文件类型时:

file C:/Users/echristopherson/Development/Ruby/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.9/lib/nokogiri/nokogiri.so

它输出:

PE32+ executable for MS Windows (DLL) (console) Mono /.Net assembly.

我究竟做错了什么?我用gem install –pre nokogiri得到了相同的结果….

根据您的输出,我看到您正在使用Ruby 2.0.0. Nokogiri在Windows x64上还没有支持Ruby 2.0.0;根据 Nokogiri issue 864,这是由于 rake-compiler’s current inability (as of May 7, 2013) to target the x64-mingw32 platform.