Questions tagged «nokogiri»

3
Node.js上的HTML解析器
关闭。此问题不符合堆栈溢出准则。它当前不接受答案。 想改善这个问题吗?更新问题,使其成为Stack Overflow 的主题。 5年前关闭。 改善这个问题 在nodejs上有像Ruby的nokogiri这样的东西吗?我的意思是用户友好的HTML解析器。 我在Node.js模块页面上看到了一些解析器,但是找不到漂亮又新鲜的东西。

30
为什么在Mac OS上安装Nokogiri失败并缺少libiconv?
我一直试图在Mac OS 10.9.3上安装Nokogiri,无论我如何尝试,最终安装都会失败,并显示以下错误消息: $ sudo gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib Building native extensions with: '--with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib' This could take a while... Building nokogiri using packaged libraries. ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb --with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.1/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28 --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include …

30
在OSX 10.9 Maverick上安装Nokogiri时出错?
我将OSX(Lion)升级到Mavericks,但无法为我的项目安装Nokogiri。 我已经安装了XCode 5.0.1,命令行工具(使用 xcode-select --install),并且已经从Homebrew安装了libxml2,但仍然遇到问题。 错误是: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/ericcamalionte/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb checking for libxml/parser.h... *** 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. …

16
Mac用户并得到警告:Nokogiri是针对LibXML版本2.7.8构建的,但已动态加载2.7.3。
我进行了各种研究,并尝试了许多不同的方法。我知道这个问题已经回答了很多次,但是没有建议的解决方案对我有用。 升级到Lion之后,我在Ruby中遇到了分段错误。我相当有信心是Nokogiri。所以我通过Homebrew安装了libxml2。我跑了brew link libxml2。然后,我使用该版本的库重新安装了Nokogiri。 为了证明: $ nokogiri -v # Nokogiri (1.5.0) --- warnings: [] nokogiri: 1.5.0 ruby: version: 1.9.2 platform: x86_64-darwin11.0.0 description: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0] engine: ruby libxml: binding: extension compiled: 2.7.8 loaded: 2.7.8 我已经将Nokogiri包含在我的gemfile的顶部,并且在我的环境文件中也需要它。我不知道为什么我仍然收到该警告。 有什么建议或想法可以确保它正在加载正确的版本libxml2?
82 ruby  macos  nokogiri  libxml2 



17
nokogiri gem安装错误
我知道这个宝石有很多问题,但是没有答案对我有用。 当我在SSH中运行时,出现gem install nokogiri以下错误: Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.8.0... OK Running patch with /home/user58952277/.gem/ruby/1.9.3/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0001-Fix-parser-local-buffers-size-problems.patch... Running 'patch' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.8.0/patch.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 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.