iOS技术收藏

xcode-select: error: tool 'x

2018-05-27  本文已影响2309人  FlyingPenguin

准备Handbrake的环境时,

./configure --launch-jobs=$(sysctl -n hw.ncpu) --launch

运行时,出现了以下提示:

xcode-select: error: tool 'xcodebuild' requires Xcode, 
but active developer directory '/Library/Developer/CommandLineTools' 
is a command line tools instance

这种情况是xcodebuild的路径不正确。

localhost:HandBrake Private$ xcode-select --print-path
/Library/Developer/CommandLineTools
localhost:Developer Private$ xcodebuild -showsdks
xcode-select: error: tool 'xcodebuild' requires Xcode, 
but active developer directory '/Library/Developer/CommandLineTools' 
is a command line tools instance

将路径切换到Xcode的目录下:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/

References:

https://handbrake.fr/docs/en/1.1.0/developer/build-mac.html
https://blog.csdn.net/woaizijiheni/article/details/50614062

上一篇 下一篇

猜你喜欢

热点阅读