xcode ios-deploy 无法在 Mac OS X El Capitan 10.11 上安装

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34195673/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:18:16  来源:igfitidea点击:

ios-deploy fail to install on Mac OS X El Capitan 10.11

iosnode.jsxcodecordovaionic-framework

提问by user1995781

I am trying to install ios-deploy on Mac OS X El Capitan 10.11 by running sudo npm install -g ios-deployand it end up with this error message:

我试图通过运行在 Mac OS X El Capitan 10.11 上安装 ios-deploysudo npm install -g ios-deploy并最终出现以下错误消息:

sh: line 1:  1106 Abort trap: 6           xcodebuild
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy"
npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! [email protected] preinstall: `./src/check_reqs.js && xcodebuild`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script './src/check_reqs.js && xcodebuild'.
npm ERR! This is most likely a problem with the ios-deploy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./src/check_reqs.js && xcodebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls ios-deploy
npm ERR! There is likely additional logging output above.

Why is it fail? How can I solve it?

为什么会失败?我该如何解决?

回答by Beat

This seems to be an issue since El Capitan. Either try:

这似乎是一个问题,因为El Capitan. 要么尝试:

npm install -g ios-deploy --unsafe-perm=true

or:

或者:

npm install -g ios-deploy --allow-root

This solution is proposed at the relating githubfrom ios-deploy.

该解决方案是建议在有关GitHub的IOS部署

回答by slorenzo

I tried with different ways.

我尝试了不同的方法。

This line worked for me.

这条线对我有用。

sudo npm install -g --unsafe-perm ios-deploy

须藤 npm install -g --unsafe-perm ios-deploy

回答by Danish

npm with allow root or unsafe params didn't worked for me. try brew. Command would be

带有允许 root 或不安全参数的 npm 对我不起作用。尝试brew。命令将是

brew install ios-deploy

if you don't have brewinstall then its couple of seconds. install here https://brew.sh/

如果你没有brewinstall 然后它几秒钟。在这里安装https://brew.sh/

brew was the only thing worked on my mac-mini High Sierra

brew 是唯一适用于我的 mac-mini High Sierra

回答by Gabe

See Newer StackOverflow https://stackoverflow.com/a/59581099/329984

请参阅较新的 StackOverflow https://stackoverflow.com/a/59581099/329984

The Homebrew and npm versions will be updated at the same time going forward.

Homebrew 和 npm 版本将在未来同时更新。

To use ios-deploy as a command-line tool it is recommended you now install it directly via Homebrew(and if you have already installed it via npm to uninstall it).

要使用 ios-deploy 作为命令行工具,建议您现在直接通过 Homebrew 安装它(如果您已经通过 npm 安装了它以卸载它)。

https://github.com/ios-control/ios-deploy#installation

https://github.com/ios-control/ios-deploy#installation

回答by Friis1978

Here is a new Solution, which is working right now.....

这是一个新的解决方案,它现在正在工作......

You need Download Xcode from APP Store, in X-code go in Preferences > Location > Command Line Tools, then select one of the listed options. After that you can install:

您需要从 APP Store 下载 Xcode,在 X-code 中进入首选项 > 位置 > 命令行工具,然后选择列出的选项之一。之后,您可以安装:

sudo npm install -g ios-sim sudo npm install --global --unsafe-perm ios-deploy

须藤 npm install -g ios-sim 须藤 npm install --global --unsafe-perm ios-deploy

回答by Angel Garcia

iOS-deploy allow us install and debug iPhone apps from the command line, without using Xcode. The first line works for me.

iOS-deploy 允许我们从命令行安装和调试 iPhone 应用程序,而无需使用 Xcode。第一行对我有用。

npm install -g ios-deploy --unsafe-perm=true

npm install -g ios-deploy --unsafe-perm=true