Questions tagged «libxml2»

11
如何在Ubuntu上安装LXML
我在Ubuntu 11上使用easy_install安装lxml遇到困难。 当我输入时,$ easy_install lxml我得到: Searching for lxml Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.3 Downloading http://lxml.de/files/lxml-2.3.tgz Processing lxml-2.3.tgz Running lxml-2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7UdQOZ/lxml-2.3/egg-dist-tmp-GacQGy Building lxml version 2.3. Building without Cython. ERROR: /bin/sh: xslt-config: not found ** make sure the development packages of libxml2 and libxslt are installed …

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 
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.