vscodeにrailsの環境構築の中で出たエラー
homebrewをインストールした後brew doctor
を行った時
Homebrew/homebrew-core (git ******** last commit *******)
*****@mbp ~ % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Your Command Line Tools are too outdated.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.3.
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force
If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
Alternatively, manually download them from:
https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.3.
softwareupdate --all --install --force
をしたが同じく表示されたので
sudo rm -rf /Library/Developer/CommandLineTools
を行った。
******@mbp ~ % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Git could not be found in your PATH.
Homebrew uses Git for several internal functions, and some formulae use Git
checkouts instead of stable tarballs. You may want to install Git:
brew install git
Warning: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
エラーが減った。
brew install git
エラーが出た。
.
.
.
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
調べてみたところ最初git -v
をしていたのでやってみた。
**********@mbp ~ % git -v
xcrun: error: active developer path ("/Library/Developer/CommandLineTools") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
そうするとxcode-select --install
が上のエラーメッセージと重なるので
xcode-select --install
を実行。
*********@mbp ~ % brew doctor
Your system is ready to brew.
エラーが出なくなった。