SOLVED FreeNAS 11.1 failed to install homebridge in jail

Status
Not open for further replies.

cwi

Cadet
Joined
Mar 23, 2014
Messages
5
Hello guys,

i tried to install homebridge in a jail on FreeNAS 11.1 and followed this guide:

https://github.com/nfarina/homebridge/wiki/FreeNAS-11-Installation-using-a-Jail

But at step 6 i got an error

Code:
> mdns@2.3.4 install /usr/local/lib/node_modules/homebridge/node_modules/mdns
> node-gyp rebuild
sh: node-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! mdns@2.3.4 install: `node-gyp rebuild`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the mdns@2.3.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!	 /root/.npm/_logs/2017-12-26T21_58_48_061Z-debug.log

The log said:
Code:
866 info lifecycle mdns@2.3.4~install: mdns@2.3.4
867 verbose lifecycle mdns@2.3.4~install: unsafe-perm in lifecycle true
868 verbose lifecycle mdns@2.3.4~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/homebridge/node_modules/mdns/node_modules/.bin:/usr/local/lib/node_modules/homebridge/node_modules/.bin:/usr/local/lib/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
869 verbose lifecycle mdns@2.3.4~install: CWD: /usr/local/lib/node_modules/homebridge/node_modules/mdns
870 silly lifecycle mdns@2.3.4~install: Args: [ '-c', 'node-gyp rebuild' ]
871 silly lifecycle mdns@2.3.4~install: Returned: code: 126  signal: null
872 info lifecycle mdns@2.3.4~install: Failed to exec install script
873 verbose unlock done using /root/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
874 verbose stack Error: mdns@2.3.4 install: `node-gyp rebuild`
874 verbose stack Exit status 126
874 verbose stack	 at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
874 verbose stack	 at EventEmitter.emit (events.js:159:13)
874 verbose stack	 at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
874 verbose stack	 at ChildProcess.emit (events.js:159:13)
874 verbose stack	 at maybeClose (internal/child_process.js:943:16)
874 verbose stack	 at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
875 verbose pkgid mdns@2.3.4
876 verbose cwd /usr/local/lib
877 verbose FreeBSD 11.1-STABLE
878 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "--unsafe-perm" "homebridge"
879 verbose node v9.3.0
880 verbose npm  v5.6.0
881 error code ELIFECYCLE
882 error errno 126
883 error mdns@2.3.4 install: `node-gyp rebuild`
883 error Exit status 126
884 error Failed at the mdns@2.3.4 install script.
884 error This is probably not a problem with npm. There is likely additional logging output above.
885 verbose exit [ 126, true ]


node --version v9.3.0

Can anyone help me?
 
Last edited by a moderator:
Joined
Jul 10, 2016
Messages
521
Run this command after step #5 and before step #6: npm install -g node-gyp node-pre-gyp
 

kingtj

Dabbler
Joined
Jun 21, 2011
Messages
26
I'm running into pretty much the same issue, trying to set this up in a new jail on FreeNAS, v11.1-U2. I tried issuing the command: npm install -g node-gyp node-pre-gyp

between steps 5 and 6, and while that command itself ran ok -- it didn't fix my error in step 6.

Did something change again with versions and a new command is needed?
 
Joined
Jul 10, 2016
Messages
521
Step #1 has you create a warden-managed jail, but the templates have not been updated & some packages such as node & npm do not longer work.
https://forums.freenas.org/index.ph...rden-jail-template-11-0x64.59910/#post-424816

The instructions in the first post should work fine using iocage-managed jails. Unfortunately, these are not fully supported by the FreeNAS UI yet, but you can search the forum or the documentation on how to create one of these.
 
Status
Not open for further replies.
Top