在运行npm安装时看到以下错误,需要node-gyp…但可以被任何需要xcode-select的东西触发。
xcodebuild工具需要Xcode,但是是活动的 开发者目录'/Library/ developer /CommandLineTools'是一个命令 直线工具实例
有什么问题吗?
在运行npm安装时看到以下错误,需要node-gyp…但可以被任何需要xcode-select的东西触发。
xcodebuild工具需要Xcode,但是是活动的 开发者目录'/Library/ developer /CommandLineTools'是一个命令 直线工具实例
有什么问题吗?
当前回答
我在尝试使用npm安装包时遇到了一个问题。 我得到了错误:“sudo xcode-select -s /Applications//Xcode.app/Contents/Developer/”
要解决这个问题
我打开Xcode。 首选项 位置 选择命令林工具:Xcode 6.1.1
现在当用npm安装包时,我不再会得到错误。
其他回答
我得先运行这个
sudo xcode-select --reset
then
sudo xcode-select -switch /Library/Developer/CommandLineTools
然后就成功了。
我只是运行了以下命令,问题为我解决了:
sudo xcode-select --reset
没有Xcode:创建文件/usr/local/bin/xcodebuild的内容来欺骗XcodeSelect
#!/bin/bash
exit 0
Chmod +x /usr/local/bin/xcodebuild
Xcode >首选项>位置>命令行工具
选择与你的Xcode版本匹配的选项。
只需运行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.