0

我跑brew install node过去说Warning: The post-install step did not complete successfully You can try again using `brew postinstall node。然后我运行brew postinstall --debug节点,然后它失败了:

An exception occurred within a child process:
  Errno::EACCES: Permission denied @ rb_sysopen - /usr/local/lib/node
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1386:in `block in copy_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1385:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1385:in `copy_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1353:in `copy'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:478:in `block in copy_entry'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1484:in `wrap_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1487:in `block in wrap_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1486:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1486:in `wrap_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:475:in `copy_entry'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:453:in `block in cp_r'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1557:in `block in fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1571:in `fu_each_src_dest0'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:1555:in `fu_each_src_dest'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fileutils.rb:452:in `cp_r'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/node.rb:62:in `post_install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1036:in `block (2 levels) in run_post_install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:891:in `with_logging'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1035:in `block in run_post_install'
/usr/local/Homebrew/Library/Homebrew/utils.rb:474:in `with_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1025:in `run_post_install'
/usr/local/Homebrew/Library/Homebrew/postinstall.rb:21:in `<main>'

当我运行brew doctor时,它会响应:

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/node/v8-testing.h

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python
  python@3.8

当我运行brew config它时,它会响应:

HOMEBREW_VERSION: 2.4.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: f455fe28a7a47b51af090b308e95535d6cf0a423
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 3e559ee9667cd55a21aa4bfaa50074cea090b4fb
Core tap last commit: 26 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_MAKE_JOBS: 4
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.24.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 14.0.1, 11.0.7, 1.8.0_252
macOS: 10.15.5-x86_64
CLT: 1103.0.32.59
Xcode: 11.5

我正在运行 Mac OS Catalina。我尝试卸载节点并重新安装节点。我试图给予必要的酿造许可,但这也无济于事。谁能帮我?

4

1 回答 1

0

你能试试brew reinstall node吗?

如果这不起作用,您可以附加brew doctorbrew config进行调试吗?祝你好运!

于 2020-07-09T14:33:57.077 回答