Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get an alert "Can't download the software because of a network problem" after xcode-select --install

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

like image 1000
Milena Avatar asked Apr 15 '20 15:04

Milena


3 Answers

Though this is a quiet old thread, I would like to mention how I resolved it. This happens when you set the timezone incorrectly. Check whether the timezone is correctly set and it will solve this issue.

like image 81
Sanduni Pavithra Avatar answered Oct 12 '22 22:10

Sanduni Pavithra


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

like image 22
Milena Avatar answered Oct 12 '22 22:10

Milena


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

like image 4
rphv Avatar answered Oct 12 '22 23:10

rphv