如何在OSX 10.14上修复Zlib缺失错误?

问题描述 投票:0回答:1

我在Ruby上为Rails安装Gems时发现这个“Zlib缺失”,请让我知道一个解决方案:

Fetching nokogiri 1.10.2
Installing nokogiri 1.10.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.2/ext/nokogiri
/usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.6.2/lib/ruby/2.6.0 -r ./siteconf20190407-34092-u44l37.rb extconf.rb
checking if the C compiler accepts  -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
checking for iconv.h... yes
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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.

我还重新安装了OSX 10.14 SDK标头,但没有用。

ruby rubygems zlib
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.