homebridge-apple-tv
homebridge-apple-tv copied to clipboard
Cannot install Error: [email protected]
I was trying to get this plugin installed on my home bridge docker, but I am hitting some issues with installing sodium. I am using the oznu home bridge docker and this is my startup.sh
apk add libtool
apk add autoconf
apk add automake
apk add libsodium
apk add g++
npm rebuild
verbose stack Error: [email protected] install: `node install.js --install`
verbose stack Exit status 1
verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
verbose stack at EventEmitter.emit (events.js:182:13)
verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
verbose stack at ChildProcess.emit (events.js:182:13)
verbose stack at maybeClose (internal/child_process.js:962:16)
verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
verbose pkgid [email protected]
verbose cwd /homebridge
verbose Linux 4.18.17-unRAID
verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-apple-tv" "--unsafe-perm"
verbose node v10.13.0
verbose npm v6.4.1
error code ELIFECYCLE
error errno 1
error [email protected] install: `node install.js --install`
error Exit status 1
error Failed at the [email protected] install script.
error This is probably not a problem with npm. There is likely additional logging output above.
6656 verbose exit [ 1, true ]
I ran into the same problem on Ubuntu 18.0.3. The 2.0.3 dependency come from a dependency of this project which is node-apple-tv. I have not figured out a workaround.
I have the same problem on my Banana PI M2 Berry with Raspbian Strech. So far, haven't found a solution. `/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287 throw new Error(cmdLine + ' exited with code ' + code); ^
Error: make nodesodium exited with code null
at ChildProcess.node install.js --install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/2018-11-26T20_19_37_007Z-debug.log`
same problem here
Maybe @lprhodes can give some advice on this one.
I know the issue lies with trying to install node-apple-tv plugin to Homebridge, so maybe I can create an issue there as well. I was trying to troubleshoot this past weekend, but just kept seeing the same error with multiple "fix attempts"
Based on the logs, I'm guessing something is going on with the directories it is looking for in node_modules
8623 warn rollback Rolling back [email protected] failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/homebridge/node_modules/node-appletv/node_modules/sodium'
8624 warn rollback Rolling back [email protected] failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/homebridge/node_modules/homebridge-apple-tv/node_modules/homebridge-platform-helper'
8625 warn rollback Rolling back [email protected] failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/homebridge/node_modules/node-appletv/node_modules/sodium'
Is the developer still active? Or did anyone else achieve any progress?
Does not look like he has been active for a few months :(
I'll try to dig in deeper and figure out what is going on. If anyone else figures this out, please share.
Same issue here.
Same for me, can't install
try pponce/homebridge-apple-tv
try pponce/homebridge-apple-tv
Tried to install from this package, got the same problem with for bot global and local types of installation:
Static libsodium was not found at /root/.npm/_cacache/tmp/git-clone-77f03c40/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
Same here on a Synology NAS (node.js v10.13)...
My change in pponce/homebridge-apple-tv was to make homebridge-apple-tv depend on a fork of node-appletv (https://github.com/socalrds/node-appletv). That forked version of node-appletv updates its dependency to sodium 3.0.1 which in theory solves the build issue with sodium version 2.0.3. I'm running on an rpi 3 with LTS 10.14.2 version of node js.
After you received this error: Static libsodium was not found at /root/.npm/_cacache/tmp/git-clone-77f03c40/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source. Was it able to compile libsodium from source?
Can you try apt-get install autoconf automake g++ libtool prior to installing pponce/homebridge-apple-tv
try pponce/homebridge-apple-tv
Sorry, I'm new, how do i specifically install from pponce/? All the homebridge plugins I've installed so far I use npm install -f <plugin-name>
, so how do I install this one? Thanks.
npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git but i think this should work as well npm install -g pponce/homebridge-apple-tv
sorry but I only use docker command line (via sh command). if I write "sudo apt-get install libtool"... I only get "sh : sudo: not found"... As you can see I am new to this world...
My change in pponce/homebridge-apple-tv was to make homebridge-apple-tv depend on a fork of node-appletv (https://github.com/socalrds/node-appletv). That forked version of node-appletv updates its dependency to sodium 3.0.1 which in theory solves the build issue with sodium version 2.0.3. I'm running on an rpi 3 with LTS 10.14.2 version of node js.
After you received this error: Static libsodium was not found at /root/.npm/_cacache/tmp/git-clone-77f03c40/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source. Was it able to compile libsodium from source?
Can you try apt-get install autoconf automake g++ libtool prior to installing pponce/homebridge-apple-tv
Thanks a lot, got it installed like that. Now I ran into the next problem however. :) My apple-tv is discovered twice which is also an open issue here. Tried to add it manually but for this I need to install node-appletv which again wants to install Sodium 2.0.3...
@dornadeluxe Can you find where the homebridge-appletv plugin was installed? In my case it's installed in: /home/pi/.nvm/versions/node/v10.14.2/lib/node_modules/homebridge-apple-tv
If you navigate to where it was installed and then run: cd node_modules/node-appletv/bin
You should then be able to run the pair command by executing this command ./appletv pair
You should see two apple tv’s appear. Select the second one in the list to pair with. Follow instructions and copy the full key that is returned as you will need it to update your config.js for the homebridge-appletv plugin. Also add "showPairSwitches": false in the config.json for this plugin.
You should then be paired already and the plugin should auto find your Apple TV still. That solved my issues.
Another step further, thanks a lot pponce! I ran the pair process and copied the credentials and put everything in the config.js. So far so good but homebridge still is not willing to start. This is what I get now:
Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: [12/23/2018, 11:25:07 PM] [Apple TV] [INFO] Discovered Apple TV (AppleTV) at 192.168.1.221 Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: [12/23/2018, 11:25:07 PM] [Apple TV] [INFO] Discovered Apple TV (AppleTV) at 192.168.1.221 Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: [12/23/2018, 11:25:07 PM] [Apple TV] [INFO] Connecting to "Lounge Apple TV" Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/mdns/lib/resolver_sequence_tasks.js:19 Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: var error = dns_sd.buildException(errorCode); Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: ^ Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: Error: dns service error: unknown Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: at MDNSService.on_resolver_done (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/mdns/lib/resolver_sequence_tasks.js:19:30) Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: at SocketWatcher.MDNSService.self.watcher.callback (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/mdns/lib/mdns_service.js:18:40) Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: Disconnected Apple TV's Dec 23 23:25:07 bpi-iot-ros-ai systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE Dec 23 23:25:07 bpi-iot-ros-ai systemd[1]: homebridge.service: Unit entered failed state. Dec 23 23:25:07 bpi-iot-ros-ai systemd[1]: homebridge.service: Failed with result 'exit-code'.
I deleted the accessories folder and tried again and now it works, hallelujah! :) Thanks for your help and Merry Christmas!
Glad you figured that last one out. I was stumped.. Merry Christmas!
@dornadeluxe Hi there,
I had the same issue with "./accessories" module. As you did, I deleted the accessories folder.
That didn't help. Here's what I did:
I checked the original repo, folder "accessories". I manually created all 4 .js files on the same folder on my raspberry and copied the code from original repo. It worked for me. Now works perfectly.
npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git but i think this should work as well npm install -g pponce/homebridge-apple-tv
Thanks for that. I tried to install, but I get this error:
root@kali:~/.pm2/logs# npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git
[email protected] preinstall /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium node install.js --preinstall
Static libsodium was not found at /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source. libtoolize: error: Failed to create 'build-aux' make: *** [Makefile:62: libsodium] Error 1 /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293 throw new Error(cmdLine + ' exited with code ' + code); ^
Error: make libsodium exited with code 2
at ChildProcess.node install.js --preinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall 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/2018-12-26T20_36_06_544Z-debug.log root@kali:~/.pm2/logs#
Any idea how to fix this? Thanks.
Sorry I've not encountered your issue. Do you have auticonf automake g++ and libtool installe? Run: sudo apt-get install autoconf automake g++ libtool then try and install again.
Sorry I've not encountered your issue. Do you have auticonf automake g++ and libtool installe? Run: sudo apt-get install autoconf automake g++ libtool then try and install again.
Yes I already did sudo apt-get install autoconf automake g++ libtool
before install and that's what I get... To be very sure, i just ran that command again, followed by the npm install command again, and i get the same error.. as below. Help?
root@kali:/.pm2/logs# sudo apt-get install autoconf automake g++ libtool Reading package lists... Done Building dependency tree Reading state information... Done autoconf is already the newest version (2.69-11). automake is already the newest version (1:1.16.1-4). g++ is already the newest version (4:8.2.0-2). libtool is already the newest version (2.4.6-6). 0 upgraded, 0 newly installed, 0 to remove and 243 not upgraded. root@kali:~/.pm2/logs# npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git
[email protected] preinstall /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium node install.js --preinstall
Static libsodium was not found at /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source. libtoolize: error: Failed to create 'build-aux' make: *** [Makefile:62: libsodium] Error 1 /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293 throw new Error(cmdLine + ' exited with code ' + code); ^
Error: make libsodium exited with code 2
at ChildProcess.node install.js --preinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall 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/2018-12-27T02_48_09_871Z-debug.log root@kali:~/.pm2/logs#
Any ideas please? Thanks.
I am having similar issues with sodium as well -- can anyone assist me?
Currently running node: 11.6.0, raspberry 3
Installed plugin successfully using: sudo npm install -g homebridge-apple-tv --unsafe-perm
When I attempt to run homebridge, I receive the following error. Also, I am attempting to run this plugin with the Nest plugin (which is active and working).
[1/4/2019, 8:32:37 AM] ==================== [1/4/2019, 8:32:37 AM] ERROR LOADING PLUGIN homebridge-apple-tv: [1/4/2019, 8:32:37 AM] Error: Cannot find module '../build/Release/sodium' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15) at Function.Module._load (internal/modules/cjs/loader.js:529:25) at Module.require (internal/modules/cjs/loader.js:657:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/lib/sodium.js:16:15) at Module._compile (internal/modules/cjs/loader.js:721:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) [1/4/2019, 8:32:37 AM] ====================
Any ideas on how to resolve this? I tried updating and following the instructions above, but no luck. Thanks!
I was able to build with sodium 3. See https://github.com/edc1591/node-appletv/issues/15
I was able to build with sodium 3. See edc1591/node-appletv#15
How did you achieve installing? what commands did you use? i installed sodium 3 and still had problems installing.
@nibty how did you do it. I read article but its for MacOs. im running on Rasbian Stretch Last build.
For anyone who doesn't want to wait for @lprhodes to update his repo, you can install GioCirque's cloned and fixed version with the following command:
npm install -g -save git+https://github.com/GioCirque/homebridge-apple-tv.git
NOTE: if @lprhodes ends up updating his repo and homebridge plugin, and if @GioCirque doesn't continue to maintain his package, you won't see any upgrades and miss out on new features should there be any.