xcode-seleccionar error de directorio de desarrollador activo


Vio el siguiente error al ejecutar un npm install que requería node-gyp... pero podría ser desencadenada por cualquier cosa que requiera xcode-select.

Xcode-select: error: la herramienta' xcodebuild ' requiere Xcode, pero está activa el directorio de desarrolladores'/Library/Developer / CommandLineTools ' es un comando instancia de herramientas de línea

¿Cuál es el problema?

Author: Or A., 2013-08-01

11 answers

Este problema ocurre cuando xcode-select el directorio del desarrollador apuntaba a /Library/Developer/CommandLineTools, cuando se requería un Xcode normal completo (sucede cuando se instalan CLT después de Xcode)

Solución:

  1. Instalar Xcode (obtenerlo de https://developer.apple.com/xcode / ) si aún no lo tienes.
  2. Aceptar los Términos y Condiciones.
  3. Asegúrese de que la aplicación Xcode esté en el directorio /Applications (NO /Users/{user}/Applications).
  4. Apunta xcode-select al directorio de desarrolladores de aplicaciones de Xcode usando el siguiente comando:
    sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Nota: Asegúrese de que la ruta de la aplicación Xcode sea correcta.

  • Xcode: /Applications/Xcode.app/Contents/Developer
  • Xcode-beta: /Applications/Xcode-beta.app/Contents/Developer
 768
Author: tjmehta,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-09-04 20:44:23

Otra solución para aquellos que no quieren instalar Xcode:

  1. Instale Herramientas de Línea de comandos (si no lo ha hecho ya):

    xcode-select --install

  2. Cambiar active directory:

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

Esto funcionó para mí (git).

 131
Author: Indamix,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-10-22 22:44:28

Tuve un problema al intentar instalar paquetes usando npm. Tengo el error: "sudo xcode-select-s/Applications/ / Xcode.app / Contents / Developer / "

Para arreglar esto

  • Abrí Xcode.
  • Preferencias
  • Ubicaciones
  • Seleccionado el comando Lin Tools: Xcode 6.1.1

Ahora al instalar paquetes con npm ya no recibo errores.

 106
Author: jay-nbt,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-02-09 13:18:48

Xcode->Preferencias->Ubicaciones - > herramientas de línea de comandos

pantallazo

Seleccione la opción: Xcode 8.x

 56
Author: FranklinA,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-26 15:10:51

Simplemente ejecute sudo xcode-select -r que debería restablecer automáticamente la ruta.

 -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.
 31
Author: chunkyguy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-01-08 16:27:26

Por si estás usando xcode beta:

sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer
 9
Author: Andrey Deineko,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-02-08 20:30:26

Instala Xcode desde App Store. Después de instalar ejecute xcodebuild con privilegios de root, es decir, sudo xcodebuild y acepte el idioma. Después de esto npm install bcrypt funcionó como un encanto!

 3
Author: sandeepkohli,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-02-20 11:57:32
  1. Descargar Xcode desde App Store.

  2. Vaya a Preferencias de Xcode / Ubicaciones / CommandlineTools

    Solo tienes que configurarlo a la versión Xcode. Apunta automáticamente a ' / Application / Xcode.app "

 3
Author: Rahul Shenoy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-29 23:36:52

Sin Xcode: crear archivo /usr/local/bin/xcodebuild con contenido para engañar XcodeSelect

  #!/bin/bash
  exit 0

chmod +x /usr/local/bin/xcodebuild

 1
Author: javamonk,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-12-23 16:13:14

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

Presta atención al "\" para escapar del espacio

 1
Author: turibbio,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-01-27 23:35:48

Tenía dos instancias de Xcode instaladas xcode.app y xcode-beta.app Cuando traté de crear una compilación con netbeans me mostró el error "versión soportada de xcode y herramientas de línea de comandos no encontrada netbeans"

Seguí los siguientes pasos:

  1. "xcode-select print print-path" es igual a "/Applications/Xcode.app / Contents / Developer "
  2. " / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.plataforma " existe
  3. " xcodebuild-version" comienza con"Xcode"

Después de 1 encontré que me está apuntando a xcode-beta.app

Así que aquí está la solución que funcionó como un encanto:

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

 1
Author: Shashank Saxena,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-04-01 06:36:43