Catalina Install Xcode Command Line Tools

If you don’t intend to use ios. rules, it is sufficient to install the Xcode command line tools package by using xcode-select: xcode-select -install Otherwise, for ios. rule support, you must have Xcode 6.1 or later with iOS SDK 8.1 installed on your system. It started failing when I was doing npm install. The issue reported was regarding the xcode-select CLT. We usually avoid installing full xcode and install the CLT (Command Line Tools) using xcode-select -install command. Tried to run the command again but it did not work as CLT was already installed. I did struggle for sometime to fix the issue.

2020-12-06

The Question :

I am trying to update Xcode from the command line. Initially I tried running:

  • Install Xcode’s Command Line Tools You need Xcode for some Homebrew tools, Xcode is a macOS integrated development environment (IDE). You can use it to make apps for all mac OSs, iOS, iPad OS, watch OS, and tv OS.
  • . Label: Command Line Tools beta 5 for Xcode-11.0 # Title: Command Line Tools beta 5 for Xcode, Version: 11.0, Size: 224804K, Recommended: YES, The text was updated successfully, but these errors were encountered.

which resulted in this message:

Catalina install xcode command line tools

So the question remains, is there a way to update Xcode from the command line?

  • ehow.com/how_12225687_update-xcode-terminals.html try this
  • @RohitPradhan does that work?
  • @psjv …not tried yet,
  • So obviously you can install from the app store… However I have a hunch that using a terminal command will be faster and more effecient than using the appstore (GUI?). Can anyone build on this idea? I put GUI in paranthesis because i dont know if im using the right terminology.

The Answer 1

493 people think this answer is useful

What you are actually using is the command to install the Xcode command line tools – xcode-select --install. Hence the error message you got – the tools are already installed.

The command you need to update Xcode is softwareupdate command [args ...]. You can use softwareupdate --list to see what’s available and then softwareupdate --install -a to install all updates or softwareupdate --install <product name> to install just the Xcode update (if available). You can get the name from the list command.

As it was mentioned in the comments here is the man page for the softwareupdate tool.

2019 Update

A lot of users are experiencing problems where softwareupdate --install -a will in fact not update to the newest version of Xcode. The cause for this is more than likely a pending macOS update (as @brianlmerritt pointed out below). In most cases updating macOS first will solve the problem and allow Xcode to be updated as well.

Updating the Xcode Command Line Tools

Catalina Install Xcode Command Line Tools List

A large portion of users are landing on this answer in an attempt to update the Xcode Command Line Tools. The easiest way to achieve this is by removing the old version of the tools, and installing the new one.

A popup will appear and guide you through the rest of the process.

The Answer 2

I had the same issue and I solved by doing the following:

  1. removing the old tools ($ sudo rm -rf /Library/Developer/CommandLineTools)
  2. install xcode command line tools again ($ xcode-select --install).

After these steps you will see a pop to install the new version of the tools.

The Answer 3

I encountered the same issue when I uninstalled the complete version of Xcode to reinstall the CLI version. My fix was:

sudo xcode-select -s /Library/Developer/CommandLineTools

The Answer 4

Just type the commands

Reference: https://forums.developer.apple.com/thread/104296

The Answer 5

I got this error after deleting Xcode. I fixed it by resetting the command line tools path with sudo xcode-select -r.

Before:

After:

The Answer 6

After installing Command Line Tools (with xcode-select --install), type:

You should be able to run git now:

The Answer 7

The Answer 8

Xcode::Install is a simple cli software that allow you to install/select a specific Xcode version.

You can install it using gem install xcode-install
Then you will be able to install a specific version with xcversion install 9.4.1
And if you have more than one version installed, you can switch version with xcversion select 9.4

You can find more information at https://github.com/KrauseFx/xcode-install

Catalina Install Xcode Command Line Tools Free

The Answer 9

@Vel Genov’s answer is correct, except when the version of Xcode can’t be updated because it is the latest version for your current version of Mac OS. If you know there is a newer Xcode (for example, it won’t load an app onto a device with a recent version of iOS) then it’s necessary to first upgrade Mac OS.

Further note for those like me with old Mac Pro 5.1. Upgrading to Mojave required installing the metal gpu (Sapphire AMD Radeon RX 560 in my case) but make sure only HDMI monitor is installed (not 4K! 1080 only). Only then did install Mojave say firmware update required and shut computer down. Long 2 minute power button hold and it all upgraded fine after that!

Catalina update – softwareupdate --install -a won’t upgrade xcode from command line if there is a pending update (say you selected update xcode overnight)

The Answer 10

I was trying to use the React-Native Expo app with create-react-native-app but for some reason it would launch my simulator and just hang without loading the app. The above answer by ipinak above reset the Xcode CLI tools because attempting to update to most recent Xcode CLI was not working. the two commands are:

This process take time because of the download.I am leaving this here for any other would be searches for this specific React-Native Expo fix.

The Answer 11

Hello I solved it like this:

Install Application> Xcode.app> Contents> Resources> Packages> XcodeSystemResources.pkg.

The Answer 12

I was facing the same problem, resolved it by using the following command.

sudo xcode-select -s /Library/Developer/CommandLineTools

After running the above command then xcode-select -p command showed the following.

/Library/Developer/CommandLineTools

The Answer 13

xCode version 11.2.1 is necessary for building app in iPad 13.2.3, When I directly try to upgrade from xcode 11.1 to 11.2.1 through App Store it get struck, So after some research , I found a solution to upgrade by removing the existing xcode from the system

So here I am adding the steps to upgrade after uninstalling existing xcode.

  1. Go to Applications and identify Xcode and drag it to trash.
  2. Empty trash to permenently delete Xcode.
  3. Now go to ~/Library/Developer/ folder and remove the contents completely Use sudo rm -rf ~/Library/Developer/ to avoid any permission issue while deleting
  4. Lastly remove any cache directory associated with xcode in the path ~/Library/Caches/com.apple.dt.Xcode sudo rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
  5. After completing the above steps you can easly install xcode from App Store, which will install the current latest version of xcode
Catalina Install Xcode Command Line Tools

Note: Please take a backup of your existing projects before making the above changes

Can't Install Xcode Command Line Tools Catalina

The Answer 14

To those having this issue after update to Catalina, just execute this command on your terminal

The latest version of Mac OS X, High Sierra, comes with Python 2.7 out of the box.

You do not need to install or configure anything else to use Python 2. Theseinstructions document the installation of Python 3.

The version of Python that ships with OS X is great for learning, but it’s notgood for development. The version shipped with OS X may be out of date from theofficial current Python release,which is considered the stable production version.

Doing it Right¶

Let’s install a real version of Python.

Before installing Python, you’ll need to install GCC. GCC can be obtainedby downloading XCode, the smallerCommand Line Tools (must have anApple account) or the even smaller OSX-GCC-Installerpackage.

Note

If you already have XCode installed, do not install OSX-GCC-Installer.In combination, the software can cause issues that are difficult todiagnose.

Note

If you perform a fresh install of XCode, you will also need to add thecommandline tools by running xcode-select--install on the terminal.

While OS X comes with a large number of UNIX utilities, those familiar withLinux systems will notice one key component missing: a package manager.Homebrew fills this void.

To install Homebrew, open Terminal oryour favorite OSX terminal emulator and run

The script will explain what changes it will make and prompt you before theinstallation begins.Once you’ve installed Homebrew, insert the Homebrew directory at the topof your PATH environment variable. You can do this by adding the followingline at the bottom of your ~/.profile file

Now, we can install Python 3:

This will take a minute or two.

Pip¶

Homebrew installs pip pointing to the Homebrew’d Python 3 for you.

Working with Python 3¶

At this point, you have the system Python 2.7 available, potentially theHomebrew version of Python 2 installed, and the Homebrewversion of Python 3 as well.

will launch the homebrew-installed Python 3 interpreter.

Catalina Install Xcode Command Line Tools Download

will launch the homebrew-installed Python 2 interpreter (if any).

will launch the homebrew-installed Python 3 interpreter.

If the Homebrew version of Python 2 is installed then pip2 will point to Python 2.If the Homebrew version of Python 3 is installed then pip will point to Python 3.

The rest of the guide will assume that python references Python 3.

Pipenv & Virtual Environments¶

The next step is to install Pipenv, so you can install dependencies and manage virtual environments.

A Virtual Environment is a tool to keep the dependencies required by different projectsin separate places, by creating virtual Python environments for them. It solves the“Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keepsyour global site-packages directory clean and manageable.

For example, you can work on a project which requires Django 1.10 while alsomaintaining a project which requires Django 1.8.

So, onward! To the Pipenv & Virtual Environments docs!

This page is a remixed version of another guide,which is available under the same license.