macOS High Sierra – Unable to Run xcode-select –install

high sierramacosxcode

I am on a MacBook Air running macOS High Sierra 10.13.2
When I run xcode-select --install to re-install Xcode developer tools, I am prompted to this

enter image description here

I choose install option which opens the agree terms prompt

enter image description here

agree terms and this appears

enter image description here

and nothing happens for 30 mins, so I tried to stop and it didn't work, I tried the quit option from the dock which didn't work either. I had to force quit Install commandLine Developer Tools. Can anyone help me how to reinstall CommandLine Developer Tools. Thank you

Best Answer

I'd reboot the system and try again.

If that doesn't work, you can download it from Apple Developer.

If you don't have an Apple Developer Account, you can create a free account, and then once signed in you can download the "Command Line Tools (macOS 10.13) for Xcode 9.1" from: Downloads from Apple Developers

Downloads from Apple Developers