If you have this error, and you running
xcode-select --install tells you you have them installed, you will need to remove them and then install them again, you can do that with.
sudo rm -rf $(xcode-select --print-path) && xcode-select --install
The first part with get the path where
xcode-select was installed and remove it and the second part will install it again.