Nokogiri无法在OS X上安装 [英] Nokogiri fails to install on OS X

查看:77
本文介绍了Nokogiri无法在OS X上安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这个问题上有很多帖子,但是,为什么Nokogiri(版本1.6.x,1.7.x或1.8.x)无法在OS X上安装,有两个原因。



相关文章:


  • OS X 10.6安装Nokogiri

    = https://stackoverflow.com/questions/21887068/cannt-install-nokogiri-1-6-1-on-mac-os-x-10-9-maveriks?noredirect=1&lq=1>卡恩'在Mac OS X 10.9 Maveriks上安装nokogiri 1.6.1
  • >

    未安装命令行:

    这是检查和修复最简单的方法:run xcode-在终端窗口中选择--install 进行安装,然后再次运行 gem install nokogiri 来安装Nokogiri。



    有人报告说他们使用 gem install nokogiri - --use-system-libraries



    Libxml,libxlt过于新近: 这种情况是由于这些库在使用自制软件安装时可能太近了。这种情况导致安装过程中出现不兼容和致命错误。



    为了解决这个问题,有两个主要选项:

      gem install nokogiri  -  --use-system-libraries --with-xml2-include = / usr / include / libxml2 --with-xml2-lib = / usr / lib / 

      brew unlink libxml2 
    brew unlink libxslt
    brew unlink libiconv
    sudo xcode-select --install
    gem install nokogiri

    有关详情,请参阅 github上的1166问题


    There are many posts on this issue, however, there can be a couple of reasons why Nokogiri (version 1.6.x, 1.7.x or 1.8.x) fails to install on OS X.

    Related articles:

    解决方案

    Command Line not installed:

    This is the easiest one to check and fix: run xcode-select --install in a terminal window to install it, then try installing Nokogiri one more time by running gem install nokogiri.

    Some are reporting that they used gem install nokogiri -- --use-system-libraries

    Libxml, libxlt are too recent:

    This situation is due to the fact that these libraries, when installed using homebrew, may be too recent. This situation leads to incompatibilities and fatal errors during installation.

    To fix this, there are 2 main options:

    gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/
    

    or

    brew unlink libxml2
    brew unlink libxslt
    brew unlink libiconv
    sudo xcode-select --install
    gem install nokogiri
    

    For more details about the reasons why, please refer to issue 1166 on github.

    这篇关于Nokogiri无法在OS X上安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆