我正在尝试升级我的Node。在做brew update
时,我得到了这个:
$ brew update
==> Migrating Homebrew to v0.9.9
remote: Counting objects: 1027, done.
remote: Compressing objects: 100% (955/955), done.
remote: Total 1027 (delta 182), reused 346 (delta 43), pack-reused 0
Receiving objects: 100% (1027/1027), 1.18 MiB | 998 KiB/s, done.
Resolving deltas: 100% (182/182), completed with 95 local objects.
From https://github.com/Homebrew/brew
+ 5a9e19f...3fe3205 master -> origin/master (forced update)
* [new tag] 0.1 -> 0.1
HEAD is now at 3fe3205 Merge pull request #2775 from reitermarkus/language
To restore the stashed changes to /usr/local run:
'cd /usr/local && git stash pop'
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
http://docs.brew.sh/Analytics.html
==> Tapping homebrew/core
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4439, done.
remote: Compressing objects: 100% (4243/4243), done.
remote: Total 4439 (delta 35), reused 466 (delta 12), pack-reused 0
Receiving objects: 100% (4439/4439), 3.53 MiB | 812.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
Checking connectivity... done.
Tapped 4240 formulae (4,481 files, 11MB)
Already up-to-date.
==> Migrating HOMEBREW_REPOSITORY (please wait)...
Error: Failed to migrate HOMEBREW_REPOSITORY to /usr/local/Homebrew!
The error was:
Permission denied - /usr/local/lib/pkgconfig
Please try to resolve this error yourself and then run `brew update` again to
complete the migration. If you need help please +1 an existing error or comment
with your new error in issue:
https://github.com/Homebrew/brew/issues/987
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
/usr/local/Library/Homebrew/cmd/update-report.rb:268:in `block in migrate_legacy_repository_if_necessary'
/usr/local/Library/Homebrew/cmd/update-report.rb:267:in `each'
/usr/local/Library/Homebrew/cmd/update-report.rb:267:in `migrate_legacy_repository_if_necessary'
/usr/local/Library/Homebrew/cmd/update-report.rb:115:in `update_report'
/usr/local/Library/Homebrew/brew.rb:93:in `<main>'
现在,当我尝试brew
时,它找不到命令:
$ brew
-bash: /usr/local/bin/brew: No such file or directory
所以我想某种程度上brew
在更新过程中被打破了。有关如何解决此问题的任何提示?谢谢。
答案 0 :(得分:1)
为了解决这个问题,我刚刚重新安装了Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"