13

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

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! ios-deploy@1.8.3 preinstall: `./src/check_reqs.js && xcodebuild`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the ios-deploy@1.8.3 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?

user1995781
  • 19,085
  • 45
  • 135
  • 236

6 Answers6

43

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

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

or:

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

This solution is proposed at the relating github from ios-deploy.

Beat
  • 4,386
  • 2
  • 35
  • 52
  • I got exactly the same issue under OS X Yosemite (v.10.10.5). The second sentence did not change anything but the the first one has solved the issue: `npm install -g ios-deploy --unsafe-perm=true`. @Beat Thanks for your help. – Lisarien Jan 11 '16 at 14:02
  • 2
    the first one worked for me, the second did not. I have OS/X 10.11.3 – mico Feb 14 '16 at 15:58
  • Thanks, I had the same issue, the second command did not work, but the first one did "npm install -g ios-deploy --unsafe-perm=true". Also, once it ran it showed this warning, it would have been nice if it listed that on the fail. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!! WARNING: You are on OS X 10.11 El Capitan, you may need to add the !!!! WARNING: `--unsafe-perm=true` flag when running `npm install` – David Murry Feb 21 '16 at 15:12
  • second command worked for me. am writing this comment so that @Beat doesn't remove the second command because it didn't work for anybody else – Junaid Aug 23 '16 at 08:49
  • @Beat, I have installed ios-deploy as per github instruction, but still I'm unable to use the command ios_deploy, is there anything missing? – umirza47 Apr 11 '19 at 08:37
  • The Homebrew and npm versions will be updated at the same time going forward. 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). https://github.com/ios-control/ios-deploy#installation – Gabe Jan 03 '20 at 15:24
5

I tried with different ways.

This line worked for me.

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

saeta
  • 4,048
  • 2
  • 31
  • 48
3

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

brew install ios-deploy

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

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

Community
  • 1
  • 1
Danish
  • 1,467
  • 19
  • 28
0

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:

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

Friis1978
  • 1,179
  • 9
  • 16
0

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

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

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).

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

Gabe
  • 2,279
  • 1
  • 23
  • 22
-2

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

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

Angel Garcia
  • 75
  • 1
  • 4