Ruby on rails 由于OSX Mojave 10.14.2,无法在Rails应用程序中安装Nokogiri
由于最近的更新(10.14.2),我的应用程序中无法安装Nokogiri gem 当我运行Ruby on rails 由于OSX Mojave 10.14.2,无法在Rails应用程序中安装Nokogiri,ruby-on-rails,nokogiri,macos-mojave,Ruby On Rails,Nokogiri,Macos Mojave,由于最近的更新(10.14.2),我的应用程序中无法安装Nokogiri gem 当我运行bundle install时,出现以下错误: ./siteconf20190109-70456-1diyett.rb extconf.rb --use-system-libraries checking if the C compiler accepts -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-pro
bundle install
时,出现以下错误:
./siteconf20190109-70456-1diyett.rb extconf.rb --use-system-libraries
checking if the C compiler accepts -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE
-fstack-protector-strong -O2 -pipe... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future...
no
Building nokogiri using system libraries.
Using pkg-config gem version 1.3.2
checking for libxml-2.0... yes
checking for libxslt... yes
checking for libexslt... yes
checking for xmlParseDoc() in libxml/parser.h... no
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
-----
libxml2 is missing. Please locate mkmf.log to investigate how it is failing.
-----
*** 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.
我已经检查了Mojave的,但它不起作用,即使使用了这个补丁:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
设置:
操作系统:
OSX莫哈韦10.14.2
Ruby版本:
ruby 2.4.4p296(2018-03-28修订版63013)[x86_64-darwin17]
你有什么办法解决这个问题吗
提前感谢您的帮助。日志消息说缺少libxml2。 因此,尝试运行以下命令:
brew install libxml2
如果您安装了自制软件。
检查此项以了解更多信息。它对您不起作用=>?尝试减少GEM文件中的版本号,直到它起作用为止。使用
gem list--all--exact nokogiri
查看所有可能的版本。(我在猜测选项。)然后使用gem'nokogiri',“~>1.2.3.4”
升级到1.2.3.9,或者直接设置它。@Chloe,当我输入命令gem list--all--exact nokogiri
时,我得到的唯一输出是***本地GEMS***nokogiri(1.8.4)