Fail to install ios-deploy

This error occurs

OSX El. Capitan 10.11.2
Xcode version 7.2
Node 4.2.4
NPM 2.14.12

I used sudo npm install -g ios-deploy

> ios-deploy@1.8.3 preinstall /usr/local/lib/node_modules/ios-deploy
> ./src/check_reqs.js && xcodebuild

Could not print domain: 1: Operation not permitted
2016-01-04 12:08:29.013 xcodebuild[73884:1759523] launchctl print returned an error code: 256
2016-01-04 12:08:29.013 xcodebuild[73884:1759523] CoreSimulator is attempting to unload a stale CoreSimulatorService job.  Detected relocation or CoreSimulatorService version change.  Framework path (/Applications/ and version (201.3) does not match existing job path (/Applications/ and version ((null)).
2016-01-04 12:08:29.014 xcodebuild[73884:1759523] Failed to locate a valid instance of CoreSimulatorService in the bootstrap.  Adding it now.
Could not print domain: 1: Operation not permitted
2016-01-04 12:08:29.034 xcodebuild[73884:1759523] launchctl print returned an error code: 256
2016-01-04 12:08:29.034 xcodebuild[73884:1759523] *** Assertion failure in -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid], /BuildRoot/Library/Caches/
** INTERNAL ERROR: Uncaught exception **
Exception: The loaded job does not match our expectations: versionOfLoadedJob: (null), our version: 201.3
  0  0x00007fff96c8baca __exceptionPreprocess (in CoreFoundation)
  1  0x00007fff8bf3bf7e objc_exception_throw (in libobjc.A.dylib)
  2  0x00007fff96c8b8ba +[NSException raise:format:arguments:] (in CoreFoundation)
  3  0x00007fff9e4f788c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation)
  4  0x000000010c755484 -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid] (in CoreSimulator)
  5  0x000000010c755c03 -[SimServiceContext connect] (in CoreSimulator)
  6  0x000000010c7548bc -[SimServiceContext initWithConnectionType:] (in CoreSimulator)
  7  0x000000010c75441a +[SimServiceContext simContextWithConnectionType:] (in CoreSimulator)
  8  0x000000010c7543cb __41+[SimServiceContext sharedServiceContext]_block_invoke (in CoreSimulator)
  9  0x00007fff9366633f _dispatch_client_callout (in libdispatch.dylib)
 10  0x00007fff93666237 dispatch_once_f (in libdispatch.dylib)
 11  0x000000010c7543a9 +[SimServiceContext sharedServiceContext] (in CoreSimulator)
 12  0x000000010c77441a +[SimDeviceSet setForSetPath:] (in CoreSimulator)
 13  0x000000010c7743b6 +[SimDeviceSet defaultSet] (in CoreSimulator)
 14  0x0000000110091fe0 __42-[DVTiPhoneSimulatorLocator startLocating]_block_invoke (in IDEiOSSupportCore)
 15  0x000000010655da58 __DVTDispatchAsync_block_invoke (in DVTFoundation)
 16  0x00007fff93671871 _dispatch_call_block_and_release (in libdispatch.dylib)
 17  0x00007fff9366633f _dispatch_client_callout (in libdispatch.dylib)
 18  0x00007fff9366a1cf _dispatch_root_queue_drain (in libdispatch.dylib)
 19  0x00007fff93669a34 _dispatch_worker_thread3 (in libdispatch.dylib)
 20  0x00007fff9a99a68f _pthread_wqthread (in libsystem_pthread.dylib)
 21  0x00007fff9a998365 start_wqthread (in libsystem_pthread.dylib)

sh: line 1: 73884 Abort trap: 6           xcodebuild
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/Cellar/node4-lts/4.2.4/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy"
npm ERR! node v4.2.4
npm ERR! npm  v2.14.12

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.

Iā€™m seeing the exact same error. I have been googling for a solution but no luck yet.

I had this same error, and found a fix here.

The relevant command:

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

1 Like

@rmead thank you!! this solves my issue

Worked for me too. Thanks!