ios-deploy时,终端构建失败
安装ios-deploy时,终端构建失败:
ios-deploy是一个从mac电脑把app打包到手机的工具
安装:sudo npm install -g ios-deploy –unsafe-perm=true
安装出现问题:
** BUILD FAILED **
The following build commands failed:
CompileC /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy-lib.build/Objects-normal/x86_64/libios_deploy.o /usr/local/lib/node_modules/ios-deploy/src/ios-deploy-lib/libios_deploy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
npm ERR! code ELIFECYCLE
npm ERR! errno 65
npm ERR! [email protected] preinstall: ./src/scripts/check_reqs.js && xcodebuild`
npm ERR! Exit status 65
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
解决方式:
需要把macOS,ios,xcode版本号升级为一致,因为用命令安装的时候默认安装*新的ios-deploy,而电脑的配置不相符:
升级之后执行
终端运行:sudo xcode-select –switch /Applications/Xcode.app/Contents/Developer
在执行:sudo npm install -g ios-deploy –unsafe-perm=true
open /Applications/Xcode.app/Contents/Developer
安装成功