Error installing nokogiri: Failed to build gem native extension & libiconv is missing (OSX)

前端 未结 15 1455
无人共我
无人共我 2020-12-07 18:25

I try to clone this repo and run bundle install. The bundle process failed and throw this error:

    ...
    Installing nokogiri 1.6.2.1 with na         


        
15条回答
  •  醉话见心
    2020-12-07 19:09

    Spencer's answer worked for me, but I also needed to use the -n parameter to overcome the permission issue documented here.

    So in the end, the command that worked for me was:

    gem install -n /usr/local/bin nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 --use-system-libraries
    

提交回复
热议问题