$ xcode-select --install
$ sudo xcode-select --reset
$ sudo xcode-select -s /Library/Developer/CommandLineTools
Note: In case you have Xcode installed,
you may need to specify Xcode directory in this case,
it should be something like this
$ xcode-select -s /Applications/Xcode.app
$ sudo xcode-select -r
$ sudo xcode-select --switch /Library/Developer/CommandLineTools
$ sudo xcode-select -r