発生した問題
mac上でmakeコマンドを実行すると下記のようにerror: invalid active developer path
エラーが出力された
$ make
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
対応方法1
以下のコマンドを実行し、xcodeのインストールし直す。
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
対応方法2
homebrewでmakeコマンドをインストールする。
$ brew install make
この場合、コマンドはmake
ではなくgmake
異コマンドとしてインストールされる。makeコマンドとして実行したい場合は、下記のように.bashrcや.zshrcなどにPATHを通すとよい。
GNU "make" has been installed as "gmake".
If you need to use it as "make", you can add a "gnubin" directory
to your PATH from your bashrc like:
PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
こちらもおススメ