xcode-select 活动开发者目录错误 [英] xcode-select active developer directory error

查看:30
本文介绍了xcode-select 活动开发者目录错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行需要 node-gypnpm install 时看到以下错误...代码>.

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: 错误:工具xcodebuild"需要 Xcode,但处于活动状态开发者目录 '/Library/Developer/CommandLineTools' 是一个命令线工具实例

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

有什么问题?

推荐答案

这个问题发生在 xcode-select 开发者目录指向 /Library/Developer/CommandLineTools 时需要完整的常规 Xcode(在 Xcode 之后安装 CommandLineTools 时发生)

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)

解决方案:

  1. 安装 Xcode(从 https://appstore.com/mac/apple/xcode) 如果您还没有.
  2. 接受条款和条件.
  3. 确保 Xcode 应用位于 /Applications 目录中(不是 /Users/{user}/Applications).
  4. 使用以下命令将 xcode-select 指向 Xcode 应用程序开发者目录:
    sudo xcode-select -s/Applications/Xcode.app/Contents/Developer
  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

注意:确保您的 Xcode 应用程序路径正确.

Note: Make sure your Xcode app path is correct.

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

这篇关于xcode-select 活动开发者目录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆