在运行npm安装时看到以下错误,需要node-gyp…但可以被任何需要xcode-select的东西触发。
xcodebuild工具需要Xcode,但是是活动的 开发者目录'/Library/ developer /CommandLineTools'是一个命令 直线工具实例
有什么问题吗?
在运行npm安装时看到以下错误,需要node-gyp…但可以被任何需要xcode-select的东西触发。
xcodebuild工具需要Xcode,但是是活动的 开发者目录'/Library/ developer /CommandLineTools'是一个命令 直线工具实例
有什么问题吗?
当前回答
以防你使用xcode beta版:
sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer
其他回答
我得先运行这个
sudo xcode-select --reset
then
sudo xcode-select -switch /Library/Developer/CommandLineTools
然后就成功了。
对于那些不想安装Xcode的人,还有其他解决方案:
安装命令行工具(如果你还没有): xcode-select——安装 修改主目录: sudo xcode-select -switch /Library/Developer/CommandLineTools
这对我很管用(git)。
手动安装Command LineTool对我来说很有效。
我在App Store中暂停了xcode 仍然无法下载Homebrew 我通过链接手动安装命令行工具。 砰砰砰
https://developer.apple.com/download/more/?=command%20line%20tools
只需运行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.
我安装了两个Xcode实例。App和xcode-beta.app 当我试图用netbeans创建一个构建时,它向我显示了错误 支持的xcode版本和命令行工具没有找到netbeans
我遵循了以下步骤:
"xcode-select——print-path" = "/Applications/Xcode.app/Contents/Developer" " / / xcode /内容/应用开发人员/平台/ iPhoneSimulator。平台”的存在 "xcodebuild -version"以"Xcode"开头
after 1我发现它指向我到xcode-beta.app
下面是一个神奇的解决方案:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer