sudo npm install -g ios-deploy 或者 npm install -g ios-deploy,都报错误,错误如下:
npm WARN lifecycle ios-deploy@1.8.5~preinstall: cannot run in wd %s %s (wd=%s) ios-deploy@1.8.5 ./src/scripts/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-298c9491npm ERR! Darwin 15.3.0npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy"npm ERR! node v5.8.0npm ERR! npm v3.7.3npm ERR! path /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploynpm ERR! code ENOENTnpm ERR! errno -2npm ERR! syscall chmodnpm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy'npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy'npm ERR! enoent This is most likely not a problem with npm itselfnpm ERR! enoent and is related to npm not being able to find a file.npm ERR! enoent
解决如下:
sudo npm install -g ios-deploy --unsafe-perm=true