チーズナンの裏

都内勤務社畜Webエンジニアの自分用メモ。基本的にはフロント中心。

Gitの謎エラー - Xcodeのせいかも編

発生したエラー

  • いつもどおり作業しようとgitコマンドを打ち込むと下記のエラー。
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist

原因?

  • Macの容量の問題で削除したXcodeが原因?
  • ぶっちゃけよくわからない

対策

  • 下記サイトの方のを参考にさせていただくことに

tiro105.hateblo.jp

  • とりあえず
brew doctor

結果(現れたWarningたち抜粋)

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-binary
Untap them with `brew untap`.

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Warning: No developer tools installed.
Install the Command Line Tools:
  xcode-select --install


Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  ghostscript
  heroku
  python
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") 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.
See `man xcode-select` for more details.

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

Warning: Broken symlinks were found. Remove them with `brew cleanup`:

なるほどわからん
とりあえず言われたとおりにコマンドを打ちこんでみる

xcode-select --install

するとコマンドラインデベロッパーツールなるやつをインスコしろとの指示が...

(とりあえずここまで)

参考にしたサイト様

qiita.com

qiita.com