LoginSignup
1
1

More than 1 year has passed since last update.

macOS Montereyに移行した際の問題と解決法

Last updated at Posted at 2022-09-21

macOS Montereyに移行して、XcodeをインストールしてからHomebrewをインストールしようとすると以下のエラーが...

sh: line 1: 11955 Abort trap: 6           /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find git 2> /dev/null
git: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find git 2> /dev/null' failed with exit code 34304: (null) (errno=Invalid argument)
xcode-select: Failed to locate 'git', requesting installation of command line developer tools.

おまけに入れたはずのXcode command line toolsのインストールを要求され、それに従ってインストールを行い、それが終了した後にHombrewのインストールを試すと、同じメッセージとXcde command line toolsインストールの繰り返しの無限ループにハマりました。

ググったところ、以下のスレッドで解決方法が紹介されていました。

以下のコマンドを実行してパスを切り替えると良いようです。

sudo xcode-select -switch /Library/Developer/CommandLineTools

これでHombrewのインストールを行うことができました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1