安装Maintained Swift Development Environment vscode插件报错
移步小站获取更好的体验。
环境
mac os catalina 10.15.2 (19C57)
Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
Target: x86_64-apple-darwin19.2.0
xcode-select version 2373.
问题描述
根据Maintained Swift Development Environment - Visual Studio Marketplace进行安装。
在执行make install PREFIX=/usr/local出现如下报错。
make install PREFIX=/usr/local
swift build -c release
error: terminated(72): xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
make: *** [release] Error 1
解决过程
根据error: terminated(72): xcrun --sdk macosx --find xctest · Issue #1 · mxcl/homebrew-made · GitHub这位大佬的方法成功解决了问题。
我试着打印了下有问题时xcode-select的active developer directory,发现是如下目录
xcode-select -p
/Library/Developer/CommandLineTools