新手问题 mac OS 上面安装 rails 出问题

richard1230 · 2019年11月29日 · 最后由 richard1230 回复于 2019年12月01日 · 362 次阅读

mac 的版本是10.14.3 ; 使用命令: gem install rails -v 6 --verbose

$gem install rails -v 6 --verbose HEAD https://gems.ruby-china.com/api/v1/dependencies

200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=rails 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=actioncable,actionmailbox,actionmailer,actionpack,actiontext,actionview,activejob,activemodel,activerecord,activestorage,activesupport,bundler,railties,sprockets-rails 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=rack,rack-test,rails-dom-testing,rails-html-sanitizer 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=mail 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=concurrent-ruby,i18n,minitest,tzinfo,zeitwerk 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=method_source,rake,thor 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=thread_safe 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=mini_mime 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=builder,erubi 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=globalid 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=nio4r,websocket-driver 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=websocket-extensions 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=marcel 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=nokogiri 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=mini_portile2 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=loofah 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=crass 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=sprockets 200 OK GET https://gems.ruby-china.com/api/v1/dependencies?gems=mimemagic 200 OK /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/LICENSE-DEPENDENCIES.md /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/LICENSE.md /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/README.md /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/bin/nokogiri /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/dependencies.yml /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/depend /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/extconf.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_document.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_document.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_element_description.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_element_description.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_entity_lookup.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_entity_lookup.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_parser_context.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_parser_context.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_push_parser.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/html_sax_push_parser.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/nokogiri.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/nokogiri.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_attr.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_attr.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_attribute_decl.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_attribute_decl.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_cdata.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_cdata.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_comment.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_comment.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_document.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_document.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_document_fragment.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_document_fragment.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_dtd.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_dtd.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_content.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_content.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_decl.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_element_decl.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_encoding_handler.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_encoding_handler.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_decl.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_decl.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_reference.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_entity_reference.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_io.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_io.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_libxml2_hacks.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_libxml2_hacks.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_namespace.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_namespace.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_node.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_node.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_node_set.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_node_set.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_processing_instruction.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_processing_instruction.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_reader.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_reader.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_relax_ng.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_relax_ng.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser_context.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_parser_context.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_push_parser.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_sax_push_parser.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_schema.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_schema.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_syntax_error.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_syntax_error.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_text.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_text.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_xpath_context.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xml_xpath_context.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xslt_stylesheet.c /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri/xslt_stylesheet.h /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/node.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/parser.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/parser.y /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/parser_extras.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/syntax_error.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/tokenizer.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/tokenizer.rex /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/css/xpath_visitor.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/decorators/slop.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/builder.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/document.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/document_fragment.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/element_description.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/element_description_defaults.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/entity_lookup.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/sax/parser.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/sax/parser_context.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/html/sax/push_parser.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/syntax_error.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/version.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/attr.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/attribute_decl.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/builder.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/cdata.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/character_data.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/document.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/document_fragment.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/dtd.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/element_content.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/element_decl.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/entity_decl.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/entity_reference.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/namespace.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/node.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/node/save_options.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/node_set.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/notation.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/parse_options.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/pp.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/pp/character_data.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/pp/node.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/processing_instruction.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/reader.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/relax_ng.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/document.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/parser.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/parser_context.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/sax/push_parser.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/schema.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/searchable.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/syntax_error.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/text.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/xpath.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/xpath/syntax_error.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xml/xpath_context.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xslt.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/nokogiri/xslt/stylesheet.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/lib/xsd/xmlparser/nokogiri.rb /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/patches/libxml2/0002-Remove-script-macro-support.patch /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ports/archives/libxml2-2.9.10.tar.gz /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ports/archives/libxslt-1.1.34.tar.gz Building native extensions. This could take a while... current directory: /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri ["/usr/local/opt/ruby/bin/ruby", "-I", "/usr/local/Cellar/ruby/2.6.4_2/lib/ruby/2.6.0", "-r", "./siteconf20191129-1333-3pqktz.rb", "extconf.rb"] checking if the C compiler accepts -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/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.

Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/Cellar/ruby/2.6.4_2/bin/$(RUBY_BASE_NAME) --help --clean Traceback (most recent call last): 8: from extconf.rb:416:in <main>' 7: from extconf.rb:161:inadd_cflags' 6: from /usr/local/Cellar/ruby/2.6.4_2/lib/ruby/2.6.0/mkmf.rb:643:in with_cflags' 5: from extconf.rb:162:inblock in add_cflags' 4: from extconf.rb:138:in nokogiri_try_compile' 3: from /usr/local/Cellar/ruby/2.6.4_2/lib/ruby/2.6.0/mkmf.rb:585:intry_compile' 2: from /usr/local/Cellar/ruby/2.6.4_2/lib/ruby/2.6.0/mkmf.rb:532:in with_werror' 1: from /usr/local/Cellar/ruby/2.6.4_2/lib/ruby/2.6.0/mkmf.rb:585:inblock in try_compile' /usr/local/Cellar/ruby/2.6.4_2/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. ERROR: Error installing rails: ERROR: Failed to build gem native extension.

current directory: /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5/ext/nokogiri /usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.6.4_2/lib/ruby/2.6.0 -r ./siteconf20191129-1333-3pqktz.rb extconf.rb Building has failed. See above output for more information on the failure. To see why this extension failed to compile, please check the mkmf.log which can be found here:

/usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/nokogiri-1.10.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.5 for inspection. Results logged to /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/nokogiri-1.10.5/gem_make.out

出现以上错误,报错里面说You have to install development tools first.事实是我已经安装了的;(如下) $ xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates 我的gem是3.0.3这个版本;请问一下我这个问题怎么破

共收到 2 条回复

这是日志: $cat /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/nokogiri-1.10.5/mkmf.log "clang -o conftest -I/usr/local/Cellar/ruby/2.6.4_2/include/ruby-2.6.0/x86_64-darwin18 -I/usr/local/Cellar/ruby/2.6.4_2/include/ruby-2.6.0/ruby/backward -I/usr/local/Cellar/ruby/2.6.4_2/include/ruby-2.6.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -fno-common -pipe -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2 conftest.c -L. -L/usr/local/Cellar/ruby/2.6.4_2/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -lruby.2.6 " In file included from conftest.c:1: In file included from /usr/local/Cellar/ruby/2.6.4_2/include/ruby-2.6.0/ruby.h:33: In file included from /usr/local/Cellar/ruby/2.6.4_2/include/ruby-2.6.0/ruby/ruby.h:29: /usr/local/Cellar/ruby/2.6.4_2/include/ruby-2.6.0/ruby/defines.h:123:10: fatal error: 'stdio.h' file not found #include ^~~~~~~~~ 1 error generated. checked program was: /* begin / 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return 0; 6: } / end */

目前问题已搞定

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册