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: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
What is the problem?
回答1:
This problem happens when xcode-select developer directory was pointing to /Library/Developer/CommandLineTools, when a full regular XCode was required (happens when CLT are installed after XCode)
Simply run sudo xcode-select -r which should automatically reset the path.
-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.
回答7:
Install Xcode from App Store. After installing run xcodebuild with root privileges i.e. sudo xcodebuild and accept the language. After this npm install bcrypt worked like a charm!
回答8:
Without Xcode: create file /usr/local/bin/xcodebuild with content to cheat XcodeSelect
I had two instance of Xcode installed xcode.app and xcode-beta.app When I tried to create a build with netbeans it showed me the error "supported version of xcode and command line tools not found netbeans"
I followed the following steps:
"xcode-select --print-path" is equal to "/Applications/Xcode.app/Contents/Developer"