Installing XCode in MacOS
Nov 26, 2022
XCode Command Line tools are required to run different CLI programs installed with brew or similiar package. For example, in case having an error with GHCI (a Haskell interpreter):
> ghci
GHCi, version 9.2.4: https://www.haskell.org/ghc/ :? for help
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
`clang' failed in phase `gcc'. (Exit code: 1)
Run following command:
xcode-select — install
In appering window ask “Yes, install missing software” and after running a new terminal window, you can see ghci working as expected:
> ghci
GHCi, version 9.2.4: https://www.haskell.org/ghc/ :? for help
ghci>