Mac user and getting WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.7.3

前端 未结 16 1573
暖寄归人
暖寄归人 2020-11-27 11:24

I have done all kinds of research and tried many different things. I know this question has been answered many times, but none of the suggested solutions are working for me.

16条回答
  •  余生分开走
    2020-11-27 11:58

    Just ran into this myself (OS X Lion 10.7.5). My exact message was: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.3

    I tried a few suggestions mentioned here, none worked, but this did:

    gem install nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local
    

    The explanation is: "This happens because the Lion system default libxml2 (loaded at bootstrap) is used, regardless of which libxml2 Nokogiri was built against."

    Credits to: https://coderwall.com/p/o5ewia

提交回复
热议问题