Failure to install nokogiri libiconv is missing on Yosemite Mac OS X 10.10

后端 未结 10 2033
难免孤独
难免孤独 2020-12-29 07:08

Trying to install Nokogiri I’m getting the following error

Maxims-MacBook-Air:ScrapingTheApple maximveksler$ gem install nokogiri
Fetching: nokogiri-1.6.2.1.         


        
相关标签:
10条回答
  • 2020-12-29 07:50

    In my case I had upgraded Xcode and forgot to install the command line tools so install was not able to run compiler.

    The following installs the command line tools:

    xcode-select --install

    0 讨论(0)
  • 2020-12-29 07:54

    I was successfull with:

    gem install nokogiri -- \
    --with-iconv-lib=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib \
    --with-iconv-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include
    
    0 讨论(0)
  • 2020-12-29 07:55

    I was experiencing this problem as well, turns out for me it was a result of having installed macports under Mavericks, and not having migrating the setup to Yosemite.

    Following the instructions here:

    http://trac.macports.org/wiki/Migration

    Allowed me to install the older version of Nokogiri (1.5.x) that was a dependency of rspec-puppet

    0 讨论(0)
  • 2020-12-29 08:01

    The nokogiri install tutorial provides the solution:

    # bash
    brew unlink gcc
    gem uninstall nokogiri
    xcode-select --install
    gem install nokogiri
    

    If you don't have Xcode 6.1, yet, you may install it from the apple developer download site (section additional tools), as described in this blog post.

    0 讨论(0)
提交回复
热议问题