鍍金池/ 問答/iOS/ brew報錯

brew報錯

pretty@goodapp:~/codelearning/html2pic% brew install phantomjs
Updating Homebrew...
load: 3.77 cmd: git-remote-https 55363 waiting 0.13u 0.04s
load: 3.62 cmd: git 55412 running 0.56u 1.33s
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytic...

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: Failure while executing: git config --local --replace-all homebrew.analyticsmessage true
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: Failure while executing: git config --local --replace-all homebrew.private true

這個怎么破?

回答
編輯回答
喵小咪

在命令行執(zhí)行:

xcode-select --install
2018年3月7日 06:55
編輯回答
久礙你

遇到一樣的問題:

?  ~ git version           
git version 2.17.0
?  ~ brew install svn        
Updating Homebrew...
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics

dyld: Library not loaded: /usr/local/lib/libwep
  Referenced from: /Library/Developer/CommandLineTools/usr/bin/git
  Reason: no suitable image found.  Did find:
    /usr/local/lib/libwep: mmap() error 1 at address=0x1053B6000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
    /usr/local/lib/libwep: mmap() error 1 at address=0x1053D5000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
Error: Failure while executing: git config --local --replace-all homebrew.analyticsmessage true
==> Installing dependencies for subversion: apr, openssl, apr-util, lz4, readline, sqlite, utf8proc, perl
==> Installing subversion dependency: apr
dyld: Library not loaded: /usr/local/lib/libwep
  Referenced from: /Library/Developer/CommandLineTools/usr/bin/git
  Reason: no suitable image found.  Did find:
    /usr/local/lib/libwep: mmap() error 1 at address=0x102236000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
    /usr/local/lib/libwep: mmap() error 1 at address=0x102253000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
Error: Failure while executing: git config --local --replace-all homebrew.private true
?  ~ 
2017年9月25日 16:20