Xcode select error invalid developer directory library developer commandlinetools

Saw the following error when running an npm install which required node-gyp... but could be triggered by anything which requires xcode-select. xcode-select: error: tool 'xcodebuild' requires Xco...

Saw the following error when running an npm install which required node-gyp… but could be triggered by anything which requires xcode-select.

xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active
developer directory ‘/Library/Developer/CommandLineTools’ is a command
line tools instance

What is the problem?

Or A.'s user avatar

Or A.

1,1701 gold badge13 silver badges28 bronze badges

asked Jul 31, 2013 at 20:52

tjmehta's user avatar

2

This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode)

Solution:

  1. Install Xcode (get it from https://appstore.com/mac/apple/xcode) if you don’t have it yet.
  2. Accept the Terms and Conditions.
  3. Ensure Xcode app is in the /Applications directory (NOT /Users/{user}/Applications).
  4. Point xcode-select to the Xcode app Developer directory using the following command:
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Note: Make sure your Xcode app path is correct.

  • Xcode: /Applications/Xcode.app/Contents/Developer
  • Xcode-beta: /Applications/Xcode-beta.app/Contents/Developer

Naman's user avatar

Naman

25.5k26 gold badges213 silver badges346 bronze badges

answered Jul 31, 2013 at 20:54

tjmehta's user avatar

tjmehtatjmehta

27.6k4 gold badges20 silver badges18 bronze badges

22

Other solution for those who don’t want to install Xcode:

  1. Install Command Line Tools (if you haven’t already):

    xcode-select --install

  2. Change the active directory:

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

This worked for me (git).

answered Oct 22, 2013 at 22:44

Indamix's user avatar

IndamixIndamix

2,4551 gold badge17 silver badges15 bronze badges

16

I was having an issue while trying to install packages using npm.
I got the error: «sudo xcode-select -s /Applications//Xcode.app/Contents/Developer/»

To fix this

  • I opened Xcode.
  • Preferences
  • Locations
  • Selected the Command Lin Tools: Xcode 6.1.1

Now when installing packages with npm I no longer get errors.

answered Feb 9, 2015 at 13:18

jay.tech66's user avatar

jay.tech66jay.tech66

2,2551 gold badge13 silver badges6 bronze badges

5

Xcode > Preferences > Locations > Command Line Tools

screenshot

Select the option matching your version of Xcode.

shim's user avatar

shim

8,89511 gold badges72 silver badges104 bronze badges

answered Nov 26, 2016 at 15:03

FranklinA's user avatar

FranklinAFranklinA

2,0811 gold badge8 silver badges5 bronze badges

5

Simply run sudo xcode-select -r which should automatically reset the path.

 -r, --reset
              Unsets any user-specified developer directory, so that the developer directory will be found via the default search mechanism. This command must  be
              run with superuser permissions (see sudo(8)), and will affect all users on the system.

answered Jan 8, 2018 at 16:27

chunkyguy's user avatar

chunkyguychunkyguy

3,4701 gold badge28 silver badges34 bronze badges

3

I just ran the following command and the issue was resolved for me:

sudo xcode-select --reset

answered Aug 13, 2021 at 16:28

Edor Linus's user avatar

Edor LinusEdor Linus

7167 silver badges9 bronze badges

2

Type this in your terminal

xcode-select --install
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license accept

kometen's user avatar

kometen

5,9664 gold badges40 silver badges49 bronze badges

answered Jul 3, 2020 at 19:05

Denis Liger's user avatar

Denis LigerDenis Liger

1,4032 gold badges13 silver badges27 bronze badges

1

if you installed XCode already, All you have to do is to…

  • Open XCode
  • Go To Xcode > Preferences > Locations
  • From the Command Line Tools Select your XCode
    enter image description here

answered Jul 20, 2022 at 19:09

Binary_Hits00's user avatar

4

Just in case you’re using xcode beta:

sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer

answered Feb 8, 2016 at 20:30

Andrey Deineko's user avatar

Andrey DeinekoAndrey Deineko

50.7k10 gold badges111 silver badges141 bronze badges

0

I had to run this first

sudo xcode-select --reset

then

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

and then it worked.

answered Aug 3, 2019 at 21:11

Hamoonist's user avatar

HamoonistHamoonist

2,1272 gold badges18 silver badges36 bronze badges

3

  1. Download Xcode from App Store.

  2. Go to Xcode preferences/Locations/CommandlineTools

    You just have to set it to the Xcode version. It automatically points to ‘/Application/Xcode.app’

answered Sep 29, 2017 at 23:36

Rahul Shenoy's user avatar

I was having the same problem in high sierra.
running the following command solved it

npm explore npm -g -- npm install node-gyp@latest

Madbreaks's user avatar

Madbreaks

18.8k7 gold badges56 silver badges70 bronze badges

answered Dec 10, 2018 at 2:21

Luja Shrestha's user avatar

Luja ShresthaLuja Shrestha

2,6572 gold badges22 silver badges28 bronze badges

1

Please follow the steps below :

  1. The latest version of Xcode can be downloaded from https://developer.apple.com/xcode/download/
  2. It will be downloaded in the ‘Downloads’ unless specified otherwise. Please make sure to check the path where you have downloaded and extracted the Xcode
  3. Now unlike other downloaded applications, on extraction, Xcode doesn’t give the option to move it to Applications
  4. Note the XCODE-ACTUAL-LOCATION or move it to the Applications
  5. Note if you have downloaded Xcode or Xcode-beta

Based on 4 and 5, execute one of the commands (Do not execute all of them without reading above description):

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
sudo xcode-select -s /[XCODE-ACTUAL-LOCATION]/Xcode.app/Contents/Developer
sudo xcode-select -s /[XCODE-ACTUAL-LOCATION]/Xcode-beta.app/Contents/Developer

answered May 8, 2020 at 7:46

Nikhil Maheshwari's user avatar

1

Install Xcode from App Store. After installing run xcodebuild with root privileges i.e. sudo xcodebuild and accept the language. After this npm install bcrypt worked like a charm!

answered Mar 25, 2014 at 14:24

sandeepkohli's user avatar

Without Xcode: create file /usr/local/bin/xcodebuild with content to cheat XcodeSelect

  #!/bin/bash
  exit 0

chmod +x /usr/local/bin/xcodebuild

answered Dec 23, 2015 at 16:13

javamonk's user avatar

javamonkjavamonk

1801 silver badge7 bronze badges

2

Simple reinstall xcode-select

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

answered May 1, 2020 at 9:43

Semir Hodzic's user avatar

In case you are using Xcode beta, run

sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer 

instead of

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

nyedidikeke's user avatar

nyedidikeke

6,5527 gold badges44 silver badges57 bronze badges

answered Jul 26, 2019 at 17:33

M.Sobhy's user avatar

I was able to solve this error without installing the full Xcode application. You must, however, have xcode command line tools installed.

From here:

  1. $ cd /usr/bin
  2. $ sudo mv xcodebuild xcodebuild.orig (A backup just in case)
  3. $ vim xcodebuild
  4. Paste the following:
#!/bin/bash
if [[ $1 == '-version' ]]; then
  echo "Xcode 10.2.1"
  echo "Build version 10E1001"
else
  /usr/bin/xcodebuild.bak $@
fi
  1. $ sudo chmod +x xcodebuild

answered Apr 25, 2020 at 20:20

JBis's user avatar

JBisJBis

7781 gold badge9 silver badges26 bronze badges

1

XCode2:
sudo xcode-select -s /Applications/Xcode 2.app/Contents/Developer

Pay attention to the «» to escape the space

answered Jan 27, 2016 at 23:35

turibbio's user avatar

turibbioturibbio

411 gold badge1 silver badge8 bronze badges

I had two instance of Xcode installed xcode.app and xcode-beta.app
When I tried to create a build with netbeans it showed me the error
«supported version of xcode and command line tools not found netbeans»

I followed the following steps:

  1. «xcode-select —print-path» is equal to «/Applications/Xcode.app/Contents/Developer»
  2. «/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform» exists
  3. «xcodebuild -version» starts with «Xcode»

after 1 I found that it is pointing me to xcode-beta.app

so here is the solution which worked like a charm:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

bummi's user avatar

bummi

27k13 gold badges62 silver badges101 bronze badges

answered Apr 1, 2016 at 6:16

Shashank Saxena's user avatar

For context, today is Jan 28, 2019.

On my Mac, I did two things to resolve this problem:

  1. Run the following command in your terminal:
    sudo xcode-select --install

  2. Restart your Mac.

Until I restarted the computer, the problem kept occurring in my Android Studio. After reboot, it was working just fine. Also note that I did not execute any --switch commands as others are doing. I hope this helps.

Community's user avatar

answered Jan 28, 2019 at 20:27

Steve's user avatar

SteveSteve

3253 silver badges6 bronze badges

0

sudo xcode-select -s /Applications/Xcode 10.app/Contents/Developer

languoguangs-iMac:/ languoguang$ sudo xcode-select -s /Applications/Xcode 10.app/Contents/Developer
xcode-select: error: invalid argument '10.app/Contents/Developer'
Usage: xcode-select [options]

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example, 
xcodebuild) as well as the BSD development commands (such as cc and make).

Options:
  -h, --help                  print this help message and exit
  -p, --print-path            print the path of the active developer directory
  -s <path>, --switch <path>  set the path for the active developer directory
  --install                   open a dialog for installation of the command line developer tools
  -v, --version               print the xcode-select version
  -r, --reset                 reset to the default command line tools path
languoguangs-iMac:/ languoguang$ sudo xcode-select -s "/Applications/Xcode 10.app/Contents/Developer"

because my Xcode name in Application is «Xcode 10»,

sudo xcode-select -s "/Applications/Xcode 10.app/Contents/Developer"

works.

answered Nov 3, 2018 at 9:42

Languoguang's user avatar

LanguoguangLanguoguang

2,1062 gold badges8 silver badges14 bronze badges

In my case,

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer 

didn’t work because my Xcode had some special name. eg) Xcode_11.2.0_beta_2_stackoverflow.app

cd /applications
ls

Then I found my Xcode name, then replace it with

sudo xcode-select -s /Applications/{myXcodeName}.app/Contents/Developer 

It worked for me.

answered Oct 23, 2019 at 13:20

Jaeseok An's user avatar

None of the above worked for me. I originally installed Command Line Tools separately, and then all of Xcode. What worked for me was to uninstall Command Line Tools as shown here. Then, when trying to run xcode-select again, I was asked to reinstall them.

*By the way, the very reason why I found this thread was because I had installed some libraries (particularly gcc) with macports, presumably using the old Command Line Tools, and then I installed the full Xcode midway into development. So anyways, for my case, I had to reinstall macports after removing the stand-alone Command Line Tools, reinstalling them, reinstalling gcc, and then my compilation worked.

answered Jan 21, 2020 at 4:13

legel's user avatar

legellegel

2,4303 gold badges22 silver badges22 bronze badges

There are only two steps required, and the full XCode.app is not required at all:

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

At this point the «Installing Softwre» dialog pops up:

enter image description here

That’s it!

answered Apr 24, 2020 at 11:18

Mark Richman's user avatar

Mark RichmanMark Richman

28.5k25 gold badges96 silver badges157 bronze badges

None of the above solutions helped me. I was working on an old project, and I had the latest version of NodeJs installed globally (v14.x) on my computer.

No node version above 10.1.x worked for me and when testing I received the same error as above.

Solution

  • I installed «n» which is a nodeJs version manager like nvm
  • I downgraded my nodeJs version to 9.x
  • npm install now works.

I will now need to update my versions, or Specify my node version in my package.json.

answered Mar 11, 2021 at 1:09

Sweet Chilly Philly's user avatar

The simple fix that worked for me is drag and drop Xcode.app from the current location (In my case it was in downloads) to Applications.

answered Nov 19, 2022 at 12:50

gandharv garg's user avatar

Replies

I was getting the same error when I read the error below these line I find the actual issue and the problem was solved. in my case I was building flutter app from command line.

I have the same message since I have updated to Xcode 13.3. On my Macbook and on the CI as well. But it’s not a real error, more like an info/warning that does not block building and running a project.
But curious about the why though.

After installing Xcode 13.3, start up Xcode and it should ask you for permission to install extra components, go ahead and do that. Once done, the errors on the CLI should go away, they did for me.

I have two computers, one personal and one company. The company one never works right because they have it jacked up with security. So, on the company computer, I just logged into Apple Developer and manually downloaded the Command Line Tools for xCode 13.3 (701.86 MB). I am not seeing that error on the command line now.

I have two computers, one personal and one company. The company one never works right because they have it jacked up with security. So, on the company computer, I just logged into Apple Developer and manually downloaded the Command Line Tools for xCode 13.3 (701.86 MB). I am not seeing that error on the command line now.

Having the same issue, and seems more current with 13.3. Had to downgrade to 13.2.1 till this is fixed.

In my case, the following command has resolved the issue:

softwareupdate --install

None of the suggestions made here have resolved the problem for me (nor for some others, as noted above).
You don’t even have to build anything to get this to happen:

% xcodebuild --help

2022-04-22 19:10:49.692 xcodebuild[53065:8448383] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

2022-04-22 19:10:49.692 xcodebuild[53065:8448383] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] . . . . 

This with Xcode 13.3.1 and CommandLineTools installed (both by request then, again, manually).
Note, while --help causes trouble --usage does not:

% xcodebuild --usage   

Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] . . . .

Be glad you’re not on my other (M1) Mac:

% xcodebuild --help

objc[46924]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x20496deb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ad84f8). One of the two will be used. Which one is undefined.

objc[46924]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x20496df00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ad8548). One of the two will be used. Which one is undefined.

objc[46924]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x20496df50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ad8598). One of the two will be used. Which one is undefined.

objc[46924]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x20496dfa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ad85e8). One of the two will be used. Which one is undefined.

objc[46924]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x20496dff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ad8638). One of the two will be used. Which one is undefined.

objc[46924]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x20496e040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x105ad8688). One of the two will be used. Which one is undefined.

2022-04-22 19:28:15.138 xcodebuild[46924:2646597] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

2022-04-22 19:28:15.138 xcodebuild[46924:2646597] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] . . . . 

Like others I was getting no prompt for updating the CLI tools.

Running softwareupdate --install did not work for me.

SOLUTION (for me):

I had to first find the software update manually:

softwareupdate --list

This provided me with the following output:

Finding available software
Software Update found the following new or updated software:
* Label: Command Line Tools for Xcode-13.3
	Title: Command Line Tools for Xcode, Version: 13.3, Size: 718145KiB, Recommended: YES, 

I then ran:

softwareupdate -i "Command Line Tools for Xcode-13.3"

(NOTE: You pass the «Label:» output as the string as yours could be different.

This worked for me:

Remove CommandLineTools

sudo rm -rf /Library/Developer/CommandLineTools

Reinstall CommandLineTools

xcode-select --install

Select CommandLineTools

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

Hi,

I also have this problem recently, appeared suddenly, on Xcode 13.3.1 and Monterey 12.3.1.
This issue prevents me from building an iOS app with watchOS companion, but not an iOS app alone.
When I build I get this error:

error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit.

Unfortunately, I have tried all the solutions above, without success.

The solutions here didn’t work for me, but then I looked in Xcode’s Preferences under the Locations tab and saw that the Command Line Tools popup was blank. Selecting a toolset from that fixed the problem for me.

This happened to me when using git clone command. From what i’ve read throw this thread this will happed when XCode has some available updates for the command line tools. By simply updating Xcode and all it’s components the messages where gone

This where the messages:
Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore

A similar thread: https://developer.apple.com/forums/thread/698628

I had the same issues with my M1 mac, getting constantly annoying kernel warnings spamming my log output when using some of the tools bundled with Xcode, such as xcodebuild.
None of the solutions above or elsewhere helped, such as resetting (sudo xcode-select -r), reinstalling command line tools (sudo rm -rf /Library/Developer/CommandLineTools; sudo xcode-select --install), exporting SDKROOT environment variable (export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)), installing older Xcode versions from Apple’s website (https://developer.apple.com/download/all/?q=xcode and then sudo xcode-select -s /Applications/Xcode_13_0.app) — in fact older versions made it worse and in Xcode 13.4 they fixed at least the symbol collisions with libauthinstall.dylib and when I switched to older versions they came back.

This is consistently triggered when just using xcodebuild -h command.

This is very annoying, especially for users using the command line. I even tried filtering them through /etc/asl.conf with custom rules and failed, so my solution for now (although ugly, but works) is to wrap the xcodebuild command with a script that greps out the annoying logs that do not affect the build:

  • Rename xcodebuild executable to xcodebuildd:

sudo mv /Applications/Xcode.app/Contents/Developer/usr/bin/{xcodebuild,xcodebuildd}

  • Create the wrapper script filtering annoying messages:

sudo vim /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

  • Paste this:
#!/bin/bash
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuildd "${@}" 2>&1 | grep -vE "is implemented in both /usr/lib/libauthinstall.dylib|with identifier Xcode.IDEKit"
  • Add permissions to execute:

sudo chmod +x /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

And viola, clean output!

Note however that this may cause problems if your application parses xcodebuild’s output, because in some cases it outputs the process name (e.g. when using xcodebuild -h). In that case, it’s a little bit more tricky to make it output the same xcodebuild name, since if we move it to a custom directory, the @rpath libraries where xcodebuild depends upon are relative to the executable, so if we move it to a different directory, we need to change the executable @rpaths to absolute paths and then force sign it. This can be done with the following commands:

cd /tmp
cp /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuildd xcodebuild
install_name_tool ./xcodebuild 
  -add_rpath /Applications/Xcode.app/Contents/Frameworks 
  -add_rpath /Applications/Xcode.app/Contents/SystemFrameworks 
  -add_rpath /Applications/Xcode.app/Contents/SharedFrameworks 
  -add_rpath /Applications/Xcode.app/Contents/PlugIns

codesign -s '-' xcodebuild -f
sudo mkdir -p /Applications/Xcode.app/Contents/Developer/usr/bin/ext
sudo mv xcodebuild /Applications/Xcode.app/Contents/Developer/usr/bin/ext/xcodebuild

So now we can update our wrapper script to use it instead:

#!/bin/bash
/Applications/Xcode.app/Contents/Developer/usr/bin/ext/xcodebuild "${@}" 2>&1 | grep -vE "is implemented in both /usr/lib/libauthinstall.dylib|with identifier Xcode.IDEKit"

Probably resetting the mac to factory settings may help with things, but if this is not an option for you, hopefully this temporarily solution helps until Apple fixes this issue.

Learn how to deal with the MacOS Git xcrun error.

I didn’t touch my mac for a while and suddenly when I try to work doing something very basic on it, the task surprisingly fails. This time, I tried to simply clone a repository using Git and the error showed up. After some research I ended up with a solution and I want to share with you the cause of this problem and how to solve it.

Before using the solution

  • Be sure to update XCode to its latest version. Some developers have claimed that this prevent this kind of error from appearing:

Install XCode Updates

Although some people say that updating XCode fix their problem, it didn’t work in my case. So I had to mess up directly with the command line.

Solution

The exception is caused because of the missing developer command line tools in your system. To solve this problem, simply run the following command in your terminal:

xcode-select --install

Running this command will print the following text in the terminal:

xcode-select: note: install requested for command line developer tools

And will launch a prompt asking for confirmation to install the command line developer tools, be sure to install it:

Install XCode Command Line Tools

The installation will take a while, once it finishes, launch a new terminal (close any opened terminal) and try doing whatever you were doing before. In my case, I was simply cloning a repository with Git and it worked as expected. Personally, it’s kind of ridiculous that the command line tools aren’t installed by default but, anyway.

Solution for xcode-select: error: tool ‘xcodebuild’ requires Xcode

If you are working with Node.js and some module that requires node-gyp, you may find the following warning in your terminal:

xcode-select: error: tool 'xcodebuild' requires Xcode
but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

This error occurs when the xcode-select developer directory was pointing to /Library/Developer/CommandLineTools when a full regular Xcode was required (happens when CommandLineTools are installed after Xcode). You can easily fix this problem updating the developer directory to the Xcode.app like this:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Happy coding ❤️!

Xcrun error invalid active developer path causing trouble? We have your back.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.

Let’s take a look at how our Support Team recently helped out a customer with the xcrun error: invalid active developer path

How to resolve Xcrun error invalid active developer path

Some of our customers have been running into the following error when they attempt to run an update on macOS while running a git pull command:

xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun

According to our Support Techs, we can resolve the issue by installing or updating Xcode Command-line Tools and explicitly agreeing to the license agreement.

In fact, if we have Xcode installed we can go opt to resolve the issue:

    • Via command line
    • Via Apple Developer download page

How to resolve the xcrun error via command line

  1. First, we will open the terminal and run the following command to install Xcode:
    xcode-select ––install
  2. Next, we will get the following output:
    xcode-select: note: install requested for command line developer tools.
  3. After the installation is over we can test the git commands through a new terminal.

In case the problem continues, we can go ahead with a reset with this command:

sudo xcode-select --reset

How to resolve the xcrun error Via Apple Developer download page

If the xcode-select –install cannot locate the software, we can download it manually.
We can do this by heading to this link and searching for the appropriate Command Line Tools for (macOS xx.x) Xcode xx.x and then downloading the .dmg file.

According to our Support Techs, we can skip the installation of Xcode if it is already installed and run the following commands in the terminal:

sudo xcode-select --reset
sudo xcodebuild -license

[Looking for a solution to another query? We are just a click away.]

Conclusion

In essence, the skilled Support Engineers at Bobcares demonstrated how to resolve the xcrun error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

If you have a Mac and use the Terminal, you may have seen an error message stating “xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)“. Here’s how to fix it. Sometimes these command-line tools stop working after a macOS system software update, but they worked previously.

Luckily, there’s an easy way to fix the xcrun error message and get your command line tools back up and running.

For the record, the full error message is:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Fix “xcrun: error: invalid active developer path” Error in Terminal on MacOS

The solution to this problem is to reinstall or install the command line tools. Yes, even if you already have command line tools installed, it is a good idea to reinstall them to possibly fix the error message. This may be necessary after upgrading your device’s system software.

1. Installing CLT can be done from the Terminal by issuing the following command string:

xcode-select --install

2. Hit return for a progress indicator on the Command Line Tools download.

3. After installation of the Command Line Tools has been completed, your Mac should be rebooted. If you’re getting “xcrun error invalid active developer path” while working in Terminal, refresh the application or relaunch it.

NOTE: If you are using Homebrew, try updating it after re-installing Command Line tools.

How to Install Homebrew on Mac

Still seeing xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)?

Even after following the above-mentioned steps, if you see the error: invalid active developer path (/Library/Developer/CommandLineTools). The next step would be to try and install Command Line Tools using a DMG file that can be downloaded directly from the Apple website.

Again, if you are using Homebrew, you need to update it. You don’t need to uninstall and again install Homebrew on Mac.

Conclusion: Git not working after macOS Update

I hope you were able to fix Git not working after macOS Update Error. If you face any issues, please comment below. If there is any other alternative solution, please do share that in the comments.

Понравилась статья? Поделить с друзьями:
  • Xaudio2 9redist dll ошибка halo
  • Xampp error mysql shutdown unexpectedly this may be due to a blocked port missing dependencies
  • Wslregisterdistribution failed with error 0x80370102 virtualbox
  • Wsl error 80370102
  • Wsgi error no module named django