在运行npm安装时看到以下错误,需要node-gyp…但可以被任何需要xcode-select的东西触发。
xcodebuild工具需要Xcode,但是是活动的 开发者目录'/Library/ developer /CommandLineTools'是一个命令 直线工具实例
有什么问题吗?
在运行npm安装时看到以下错误,需要node-gyp…但可以被任何需要xcode-select的东西触发。
xcodebuild工具需要Xcode,但是是活动的 开发者目录'/Library/ developer /CommandLineTools'是一个命令 直线工具实例
有什么问题吗?
当前回答
只需要两个步骤,和完整的XCode。App根本不需要:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
此时弹出“Installing software”对话框:
就是这样!
其他回答
我只是运行了以下命令,问题为我解决了:
sudo xcode-select --reset
XCode2: sudo Xcode -select -s /应用程序/Xcode\ 2.app/内容/开发者
注意“\”以避开空格
只需运行sudo xcode-select -r即可自动重置路径。
-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.
手动安装Command LineTool对我来说很有效。
我在App Store中暂停了xcode 仍然无法下载Homebrew 我通过链接手动安装命令行工具。 砰砰砰
https://developer.apple.com/download/more/?=command%20line%20tools
简单的重新安装xcode-select
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install