Xcode select error invalid developer directory applications xcode app contents developer

I am using macOS Catalina (10.15). I want to install Xcode, but having trouble. When I type following in the terminal, I get an error. $ xcode-select --install xcode-select: error: command line to...

I am using macOS Catalina (10.15). I want to install Xcode, but having trouble.

When I type following in the terminal, I get an error.

$ xcode-select --install

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

But when I type the following, I get this error:

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

xcode-select: error: invalid developer directory '/Applications/Xcode.app/Contents/Developer'

Cœur's user avatar

Cœur

36.4k25 gold badges191 silver badges259 bronze badges

asked Jun 22, 2020 at 23:59

NameIsPython's user avatar

2

I was new to MacOS when I encountered this issue too.

To install Xcode we have two ways: Web and App Store on your Mac. If you download it using App Store the application will be present in the Applications Folder. For Web, a .xip is downloaded at your Download location by default Downloads Folder, which you need to click for the extraction to take place. Once the extraction happens, a Xcode Application will appear in the same location. Double click on the Application for it to install and then place the Application in the Applications Folder for it to appear in the Applications.

Now you will need to set the path for Command Line to be able to use Xcode commands.

sudo xcode-select —switch /Applications/Xcode-beta.app/Contents/Developer if you are using the Beta Version

or else

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

Note: Check your Xcode Application and use that in the path:

/Applications/Xcode Application Name.app/Contents/Developer

answered Aug 11, 2021 at 9:26

The Crazy Startup Guy's user avatar

If Xcode was downloaded from apple.com Xcode.app/Contents/Developer cannot be there. That’s a Developer command line tools install you must have got all Dev binaries under CLI pkg:

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

answered Sep 13, 2022 at 20:47

TRicks43's user avatar

TRicks43TRicks43

911 silver badge5 bronze badges

This short guide explains how to resolve the error “Can’t find Xcode install for Metal compiler. Please install Xcode and run Xcode.app to accept license or ensure active developer directory is set to current Xcode installation using xcode-select” when trying to install Unreal Engine on your Mac.

Fortunately the fix is very easy, although it does involve a fairly large download (12+GB). Just follow these few steps –

Now open UE again.

This time it will launch without the “Can’t find Xcode” error and start to compile various parts of the app, which will take a moment or two. Otherwise, you’re done!

While you’re here (or waiting for Xcode to finish downloading!) why not check out some of our other Mac tutorials, tips and tricks? 🙂

Источник

Unusual errors in xcodebuild

I am getting the following errors when running xcodebuild from the command line:

xcodebuild[22187:279813] 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

xcodebuild[22187:279813] 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

What does this mean, and how do I fix it?

I have the same issue I have tried all the possible solutions but not use can any one please help on this issue

I am no longer getting that error. I downloaded the most recent version of xCode 13.3.1 and the command line developer tools and installed those manually. It worked on both my work computer Macbook Pro (2017) and my personal computer Macbook Pro (2019).

Carl-Olsen: I installed XCOde 13.3.1, and have Monterey 13.3.1 installed. I downloaded the command line developer tools and used the Apple Installer provided to install it. Having the same problem.

You say you installed the command line developer tools manually. What did you do, to do that? That is something extra from just using the Apple Installer?

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.

Please mention ,how you solved it? Thanks.

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.

@ Murrphy for me, Xcode is not asking for permission to install extra components, how to dom it manually?

I’m having the same issue. Need manual installation instructions

I was able to get it installed by opening app store then search for xcode and open it from there (it said it was updated). when I opened it a popup asked me to install the added features before opening.

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.

Sorry, wrong answer! This fixed it:

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

The solution suggested by @ Carl -Olsen worked for me and I am no longer facing the following warning. Thanks !

For me, running that command line results in this error:

xcode-select: error: invalid developer directory ‘/Library/Developer/CommandLineTools/’ . I had to uninstall and then reinstall as shown by AlphaBo below.

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.

Sorry, wrong answer! This fixed it:

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

That does make the junk warning go away, but it’s no kind of solution. The fix needs to come from Apple.

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

This is the solution

Thank you so much!!

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:

Nah, it doesn’t fix the issue. Sorry!

This did fix the issue for me. Previously, I installed the Xcode command-line tools through Software Update. For 13.3, however, I installed the command-line tools manually. Since then I got these «Requested but did not find. » messages.

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:

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

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

I have exactly the same problem since I’ve updated to Monterey 12.3.1. When I call git the first time I open a terminal, I get the error message. It disappears on the second use. And it is triggered with xcodebuild —help but not xcodebuild —usage .

So far, I get the message, but I don’t see any problem. I only see the message and everything works fine.

] [[-target ]. |-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

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:

This provided me with the following output:

softwareupdate -i «Command Line Tools for Xcode-13.3»

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

Источник

xcode-select ошибка активного каталога разработчика

Увидел следующую ошибку при запуске npm install которого требуется node-gyp . но может быть вызвано чем-либо, что требует xcode-select .

xcode-select: error: инструмент ‘xcodebuild’ требует Xcode, но активный каталог разработчика ‘/ Library / Developer / CommandLineTools’ является экземпляром инструментов командной строки

Эта проблема возникает, когда xcode-select каталог разработчика указывал на /Library/Developer/CommandLineTools , когда требовался полный обычный XCode (случается, когда CommandLineTools устанавливается после XCode)

  1. Установите Xcode (получите его по адресу https://appstore.com/mac/apple/xcode ), если у вас его еще нет.
  2. Принять условия.
  3. Убедитесь, что приложение XCode находится в /Applications каталоге (НЕ /Users//Applications ).
  4. Укажите xcode-select каталог разработчика приложения XCode, используя следующую команду:
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Примечание. Убедитесь, что путь к приложению Xcode указан правильно.

  • Xcode: /Applications/Xcode.app/Contents/Developer
  • Xcode-бета: /Applications/Xcode-beta.app/Contents/Developer

Другое решение для тех, кто не хочет устанавливать Xcode:

Установите инструменты командной строки (если вы этого еще не сделали):

Изменить активный каталог:

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

Это сработало для меня (мерзавец).

У меня возникла проблема при попытке установить пакеты с помощью npm. Я получил ошибку: «sudo xcode-select -s /Applications//Xcode.app/Contents/Developer/»

Чтобы исправить это

  • Я открыл Xcode.
  • предпочтения
  • Места
  • Выбранные команды Лин Инструменты: Xcode 6.1.1

Теперь при установке пакетов с npm я больше не получаю ошибок.

Xcode-> Preferences-> Locations-> инструменты командной строки

Выберите опцию: Xcode 8.x

Просто запустите sudo xcode-select -r который должен автоматически сбросить путь.

На случай, если вы используете бета-версию xcode:

Я должен был запустить это первым

и тогда это сработало.

Загрузите Xcode из App Store.

Перейдите в настройки XCode / Locations / CommandlineTools

Вам просто нужно установить его на версию Xcode. Он автоматически указывает на «/Application/Xcode.app»

Установите Xcode из App Store. После установки запустите xcodebuild с правами root, т.е. sudo xcodebuild и примите язык. После этого npm install bcrypt работал как шарм!

Без XCode: создать файл /usr/local/bin/xcodebuild с контентом, чтобы обмануть XCodeSelect

chmod +x /usr/local/bin/xcodebuild

Если вы используете бета-версию Xcode, запустите

Я смог решить эту ошибку, не устанавливая полное приложение Xcode. Однако у вас должны быть установлены инструменты командной строки xcode.

  1. $ cd /usr/bin
  2. $ sudo mv xcodebuild xcodebuild.orig (Бэкап на всякий случай)
  3. $ vim xcodebuild
  4. Вставьте следующее:

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

Обратите внимание на «», чтобы выйти из космоса

У меня было установлено два экземпляра Xcode: xcode.app и xcode-beta.app. Когда я пытался создать сборку с помощью NetBeans, она показала мне ошибку «Поддерживаемая версия инструментов XCode и командной строки не найдена.

Я выполнил следующие шаги:

  1. «xcode-select —print-path» равен «/Applications/Xcode.app/Contents/Developer»
  2. «/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform» существует
  3. «xcodebuild -version» начинается с «Xcode»

после 1 я обнаружил, что он указывает мне на xcode-beta.app

так вот решение, которое работает как шарм:

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

Для контекста, сегодня 28 января 2019 года .

На моем Mac я сделал две вещи, чтобы решить эту проблему:

Запустите следующую команду в вашем терминале:
sudo xcode-select —install

Перезагрузите ваш Mac.

Пока я не перезагрузил компьютер, проблема продолжала возникать в моей Android Studio. После перезагрузки все работало нормально. Также обратите внимание, что я не выполнял никаких —switch команд, как это делают другие. Надеюсь, это поможет.

У меня была такая же проблема в высокой Сьерре. Выполнение следующей команды решило ее. npm explore npm -g — npm install node-gyp @ latest

Пожалуйста, следуйте инструкциям ниже:

  1. Последняя версия Xcode может быть загружена с https://developer.apple.com/xcode/download/
  2. Он будет загружен в «Загрузки», если не указано иное. Пожалуйста, не забудьте проверить путь, по которому вы скачали и распаковали Xcode
  3. Теперь, в отличие от других загруженных приложений, при извлечении Xcode не дает возможности переместить его в Приложения
  4. Обратите внимание на XCODE-ACTUAL-LOCATION или переместите его в Приложения
  5. Обратите внимание, если вы загрузили Xcode или Xcode-beta

На основании 4 и 5 выполните одну из команд (не выполняйте их все, не прочитав приведенное выше описание):

потому что мое имя XCode в Приложении «XCode 10»,

не работал, потому что у моего Xcode было какое-то специальное имя. например) Xcode_11.2.0_beta_2_stackoverflow.app

Затем я нашел свое имя Xcode, а затем заменил его

Это сработало для меня.

Ничто из вышеперечисленного не помогло мне. Первоначально я установил инструменты командной строки отдельно, а затем все Xcode. Для меня сработало удаление инструментов командной строки, как показано здесь . Затем при попытке запустить xcode-select снова меня попросили переустановить их.

* Кстати, причина, по которой я нашел этот поток, заключалась в том, что я установил некоторые библиотеки (в частности gcc ) macports , предположительно, с использованием старых инструментов командной строки, а затем установил полный Xcode на полпути в разработку. Так или иначе, в моем случае мне пришлось переустанавливать macports после удаления автономных инструментов командной строки, переустановить их, переустановить gcc , а затем моя компиляция работала.

Требуются только два шага, и полный XCode.app вообще не требуется:

В этот момент появляется диалоговое окно «Установка Softwre»:

Источник

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.

The reason you are seeing this error is that your system doesn’t have Xcode installed. Either you have never installed it on your Macbook or it got uninstalled during any OS update.

Macos xcrun error solution

So to fix this issue, install Xcode. If you are into iOS App development, you can install the complete version and it will solve this issue as well. Download Xcode .dmg file from the Apple developers page.

If you don’t use it, like me, you can simply search for the Command Line Tools package for Xcode and download the .dmg file for it and install it. You can download it from the Apple developers page.

The Perfect Solution:

If you don’t want to download anything and just want to run some commands in the terminal to fix this issue, then here’s the command for you:

xcode-select --install

This is the command which can be run in the terminal and will install the command line tools for Xcode. When you run this command you will be prompted to accept the license, agree with the terms and conditions, etc.

If you are shown that the download requires 7GB+ of space, then be aware you are being forced to download the Xcode Application, in that case, download the .dmg file for command line tools package specifically from the apple developer page.

The above command should fix the issue if it doesn’t run the following command too:

xcode-select --reset

Although this will fix your issue, as a follow-up step, you may need to set the path for the command line tools to run without Xcode.

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

If you face permission issues while running any of the above commands, use sudo with the commands. For example,

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

This too can work:

If you have the Xcode app installed, then try running the following command:

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

Conclusion:

This issue can happen post OS upgrade and can make services that were running well before, useless. But the above solution should fix the error that you are facing. If none of this works for you, feel free to share your error message in the comment section below.

You may also like:

  • How to Open a RAR file on your Macbook(macOS)?
  • What is Homebrew and How to Install it on Mac OSX
  • How to check OS Version of MacBook (macOS)?
  • How to Install the AWS EB CLI 3.0 on macOS

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Xcode select error command line tools are already installed use software update to install updates
  • Xcode error build input files cannot be found
  • Xcmg коды ошибок
  • Xclock error can t open display
  • Xbox ошибка подключения к live xbox

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии