安装treePL时出现Gemfile json安装错误



我试图安装treePL

https://github.com/blackrim/*treePL*/wiki/安装

按照上面的官方安装指南,通过Mac终端在我的MacBook(Mac OS 12.6(上安装。

当涉及到测试treePL是否正确安装以下代码行时:

brew test -v treepl

我收到以下错误:

An error occurred while installing json (2.6.2), and Bundler cannot
continue.
In Gemfile:
rubocop-performance was resolved to 1.15.0, which depends on
rubocop was resolved to 1.35.1, which depends on
json
Error: failed to run `/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install`!
Hongs-MacBook-Pro-309:~ hc$ 

如何修复此问题并正确安装treePL?

非常感谢。

完整脚本:

Last login: Wed Oct 19 16:05:54 on ttys000
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
Hongs-MacBook-Pro-309:~ hc$ brew test -v treepl
/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install
Fetching gem metadata from https://rubygems.org/.......
Using concurrent-ruby 1.1.10
Using minitest 5.16.3
Using ast 2.4.2
Using public_suffix 5.0.0
Using bindata 2.4.12
Using zeitwerk 2.6.1
Using bundler 2.3.23
Using connection_pool 2.3.0
Using diff-lcs 1.5.0
Using did_you_mean 1.6.1
Using docile 1.4.0
Using regexp_parser 2.6.0
Using hana 1.3.7
Installing byebug 11.1.3 with native extensions
Installing msgpack 1.6.0 with native extensions
Installing hpricot 0.8.6 with native extensions
Installing unf_ext 0.0.8.2 with native extensions
Installing json 2.6.2 with native extensions
Using uri_template 0.7.0
Using mime-types-data 3.2022.0105
Using net-http-digest_auth 1.4.1
Installing racc 1.6.0 with native extensions
Using rubyntlm 0.6.3
Using webrick 1.7.0
Using webrobots 0.1.2
Using mustache 1.1.1
Using parallel 1.22.1
Using plist 3.6.0
Using rack 3.0.0
Using rainbow 3.1.1
Installing rdiscount 2.2.0.2 with native extensions
Using rexml 3.2.5
Using rspec-support 3.11.1
Using sorbet-runtime 0.5.10461
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.3.0
Using ruby-macho 3.0.0
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.4
Using warning 1.3.0
Using i18n 1.12.0
Using tzinfo 2.0.5
Using addressable 2.8.1
Using elftools 1.2.0
Using parser 3.1.2.1
Using net-http-persistent 4.0.1
Using ecma-re-validator 0.4.0
Using mime-types 3.4.1
Using parallel_tests 3.13.0
Using rspec-core 3.11.0
Using rspec-expectations 3.11.1
Using rspec-mocks 3.11.1
Using rspec-sorbet 1.9.0
Using simplecov 0.21.2
Using activesupport 6.1.7
Using patchelf 1.3.0
Using rubocop-ast 1.21.0
Using json_schemer 0.2.21
Using rspec-github 2.3.1
Using rspec-retry 0.6.2
Using rspec_junit_formatter 0.6.0
Using rspec-its 1.3.0
Using rspec 3.11.0
Using simplecov-cobertura 2.1.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/msgpack-1.6.0/ext/msgpack
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-1bhvgyu.rb extconf.rb
checking for ruby/st.h... *** 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
--without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/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.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`block in try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in
`with_werror'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in
`block in have_header'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in
`have_header'
from extconf.rb:3:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/msgpack-1.6.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/msgpack-1.6.0
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/msgpack-1.6.0/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing msgpack (1.6.0), and Bundler cannot
continue.
In Gemfile:
bootsnap was resolved to 1.13.0, which depends on
msgpack

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.8.2/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-vl5rza.rb extconf.rb
checking for -lstdc++... *** 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
--without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
--with-static-libstdc++
--without-static-libstdc++
--with-stdc++lib
--without-stdc++lib
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/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.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in
`block in try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in
`mktmpdir'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in
`try_link0'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in
`try_link'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:789:in
`try_func'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in
`block in have_library'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in
`have_library'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/unf_ext-0.0.8.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.8.2
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/unf_ext-0.0.8.2/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing unf_ext (0.0.8.2), and Bundler
cannot continue.
In Gemfile:
mechanize was resolved to 2.8.5, which depends on
http-cookie was resolved to 1.0.5, which depends on
domain_name was resolved to 0.5.20190701, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/hpricot-0.8.6/ext/fast_xs
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-wqeeu4.rb extconf.rb
checking for stdio.h... *** 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
--without-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=/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/$(RUBY_BASE_NAME)
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/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.
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`block in try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:534:in
`with_werror'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:585:in
`try_compile'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1109:in
`block in have_header'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1108:in
`have_header'
from extconf.rb:2:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/hpricot-0.8.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/hpricot-0.8.6
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/hpricot-0.8.6/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:47:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing hpricot (0.8.6), and Bundler cannot
continue.
In Gemfile:
ronn was resolved to 0.7.3, which depends on
hpricot

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20221019-5692-j1yh1f.rb extconf.rb
creating Makefile
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
make "DESTDIR=" clean
current directory:
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
note: did not find header 'config.h' in framework 'ruby' (loaded from
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/json-2.6.2
for inspection.
Results logged to
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/extensions/universal-darwin-21/2.6.0/json-2.6.2/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:99:in
`run'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:51:in
`block in make'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:43:in
`make'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:62:in
`block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tempfile.rb:295:in
`open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/ext_conf_builder.rb:29:in
`build'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:185:in
`block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/monitor.rb:235:in
`mon_synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:181:in
`build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in
`block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in
`build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/installer.rb:830:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:72:in
`build_extensions'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/source/rubygems.rb:207:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:54:in
`install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:186:in
`do_install'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:177:in
`block in worker_pool'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:62:in
`apply_func'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:57:in
`block in process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`loop'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:54:in
`process_queue'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/bundler-2.3.23/lib/bundler/worker.rb:91:in
`block (2 levels) in create_threads'
An error occurred while installing json (2.6.2), and Bundler cannot
continue.
In Gemfile:
rubocop-performance was resolved to 1.15.0, which depends on
rubocop was resolved to 1.35.1, which depends on
json
Error: failed to run `/usr/local/Homebrew/Library/Homebrew/shims/ruby/bundle install`!
Hongs-MacBook-Pro-309:~ hc$ 

已经按照官方指南做了一些事情,不确定是哪个操作导致了成功的安装。

https://github.com/blackrim/treePL/wiki/Installation

我发现大多数问题都是由库依赖性问题引起的,即只需尝试安装错误中提到的任何库

对于mac来说,拥有自制软件和MacPorts来安装其他库是非常重要的。我很容易地安装了自制软件,使用mac终端上他们网站上的代码行。另一方面,MacPorts可以使用其网站上的安装程序进行安装https://www.macports.org/install.php

使用AppStore/官方安装程序在mac上安装Xcode(因为它包含git(和命令行工具也是非常重要的

treePLgithub站点还指出,NLopt是库的先决条件,我使用自制软件成功安装了它。adolc是交叉验证功能的可选先决条件,但我仍在努力安装它。

在通过git安装某个软件包时,我遇到了一个关于无法连接到git的错误,可以通过将git替换为https来克服防火墙来解决,请参阅本文了解更多信息无法连接到GitHub.com进行克隆

无论哪种方式,在完成以上所有内容后,我最终都可以通过测试

brew test -v treepl

最新更新