I'm trying to install xcode on my mac machine (macOS Catalina) and run
xcode-select --install
but get an alert with message "Can't download the software because of a network problem"
It may be that the URL used to download the command line tools is set to a different update server than the Apple default. If so:
$ sudo defaults read /Library/Preferences/com.apple.SoftwareUpdate CatalogURL
https://macpatch.mycompanydomain.com:443/index.sucatalog
$ sudo defaults delete /Library/Preferences/com.apple.SoftwareUpdate CatalogURL
$ xcode-select --install
$ sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL https://macpatch.mycompanydomain.com:443/index.sucatalog
Try to run the below command in the mac terminal which will update the Homebrew for Mac os version Mojave 10.14 and update missing packages.
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If the above method didn't work:
Download command line manually from here After download install the package manually.