美文网首页
brew install 报错 xcrun: error: i

brew install 报错 xcrun: error: i

作者: 夜空最亮的9星 | 来源:发表于2018-11-16 17:48 被阅读19次

brew install 报错

user@Mac # brew install pyenv
Updating Homebrew...
^C==> Installing dependencies for pyenv: autoconf and pkg-config
==> Installing pyenv dependency: autoconf
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` exited with 1.

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` exited with 1.

 user@Mac # xcode-select --install
xcode-select: note: install requested for command line developer tools

返回网络异常

解决方案

 user@Mac # sudo xcode-select -switch /Applications/Xcode.app
Password:
 user@Mac # xcode-select --install
xcode-select: note: install requested for command line developer tools

安装成功

再次使用brew install 就没问题了

user@Mac # brew install pyenv
Updating Homebrew...
^C==> Installing dependencies for pyenv: autoconf and pkg-config
==> Installing pyenv dependency: autoconf
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.mojave.bottle
######################################################################## 100.0%
==> Pouring autoconf-2.69.mojave.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
==> Summary
🍺  /usr/local/Cellar/autoconf/2.69: 71 files, 3.0MB
==> Installing pyenv dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.mojave.bo
######################################################################## 100.0%
==> Pouring pkg-config-0.29.2.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB
==> Installing pyenv
==> Downloading https://homebrew.bintray.com/bottles/pyenv-1.2.8.mojave.bottle.t
######################################################################## 100.0%
==> Pouring pyenv-1.2.8.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pyenv/1.2.8: 612 files, 2.4MB
==> Caveats
==> autoconf
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/autoconf
 user@Mac #
 

相关文章

网友评论

      本文标题:brew install 报错 xcrun: error: i

      本文链接:https://www.haomeiwen.com/subject/xgzmfqtx.html