xcode-select: error: tool 'stapler' requires Xcode, but active developer directory '/Library/Develop

单于海荣
2023-12-01

Problem 1

~/Downloads » stapler validate -v xxxxx.dmg                              
xcode-select: error: tool 'stapler' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance


Fix

I use below to fix

~/Downloads » sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

###Problem 2
继续执行Problem 1的命令,报错如下

}
 Headers: {
    "Content-Type" = "application/json";
}
Domain is api.apple-cloudkit.com
Certificate trust evaluation did not return expected result. (5)  [leaf AnchorApple ChainLength IntermediateMarkerOid LeafMarkersProdAndQA] [root MissingIntermediate]
Certificate trust evaluation for api.apple-cloudkit.com did not return expected result. CSSMERR_TP_NOT_TRUSTED.
Certificate trust evaluation did not return expected result. (5)  [leaf AnchorApple ChainLength IntermediateMarkerOid LeafMarkersProdAndQA] [root MissingIntermediate]
Certificate trust evaluation for api.apple-cloudkit.com did not return expected result. CSSMERR_TP_NOT_TRUSTED.
Could not establish secure connection to api.apple-cloudkit.com
Response is (null)
error is Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://api.apple-cloudkit.com/database/1/com.apple.gk.ticket-delivery/production/public/records/lookup, NSLocalizedDescription=cancelled, NSErrorFailingURLKey=https://api.apple-cloudkit.com/database/1/com.apple.gk.ticket-delivery/production/public/records/lookup}
Size of data is 0
CloudKit's response is inconsistent with expections: (null)
The validate action failed! Error 68.

Fix

换一个网络

Reference

https://github.com/nodejs/node-gyp/issues/569

 类似资料: