10
votes

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"

enter image description here

3

3 Answers

12
votes

I've found a solution for macOS Catalina 10.15.3 - to install Xcode CommandLineTools manually (actually I need only this part).

Steps:

  1. Go to https://developer.apple.com/download/more/?=xcode

  2. Download Command Line Tools for Xcode 11.4.1. (the latest one)

  3. Install this package manually

2
votes

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

0
votes

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)"

Refer this page for more info

If the above method didn't work:

Download command line manually from here After download install the package manually.

enter image description here