lprhodes / homebridge-apple-tv

Apple TV 4th & 5th gen plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
105 stars 15 forks source link

Cant install #48

Closed poudenes closed 1 year ago

poudenes commented 5 years ago

Hello

did follow:

sudo apt-get install libtool autoconf automake sudo npm install -g homebridge-apple-tv

get errors:

root@raspberrypi:~# sudo npm install -g homebridge-apple-tv

> sodium@2.0.3 preinstall /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium
> node install.js --preinstall

Static libsodium was not found at /usr/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'
Makefile:61: recept voor doel 'libsodium' is mislukt
make: *** [libsodium] Fout 1
/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

Error: make libsodium exited with code 2
    at ChildProcess.<anonymous> (/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287:19)
    at ChildProcess.emit (events.js:189:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! code ELIFECYCLE                                                                                                       
npm ERR! errno 1
npm ERR! sodium@2.0.3 preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sodium@2.0.3 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/2019-02-05T09_29_41_272Z-debug.log

What can this be?

MrDrache333 commented 5 years ago

Try install it using sudo npm install -g homebridge-apple-tv --unsafe-perm...also take a look at #5

PatricioooAG commented 5 years ago

apt-get install libsodium and npm install -g pponce/homebridge-apple-tv --unsafe-perm

poudenes commented 5 years ago

Thanks for the fast reply!

poudenes commented 5 years ago

Rasbian Stretch Build

autoconf is reeds de nieuwste versie (2.69-10). automake is reeds de nieuwste versie (1:1.15-6). g++ is reeds de nieuwste versie (4:6.3.0-4). libtool is reeds de nieuwste versie (2.4.6-2). libsodium-dev is reeds de nieuwste versie (1.0.11-2).

npm install -g pponce/homebridge-apple-tv --unsafe-perm

Still got this error:

Static libsodium was not found at /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.

then a long compile start. and at the end

Error: make nodesodium exited with code null
    at ChildProcess.<anonymous> (/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287:19)
    at ChildProcess.emit (events.js:189:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! code ELIFECYCLE                                                                                                                                                                                                         
npm ERR! errno 1
npm ERR! sodium@2.0.3 install: `node install.js --install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sodium@2.0.3 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/2019-02-06T05_40_08_096Z-debug.log
toppe commented 5 years ago

Same here, tried several things to get it working but no result at all.

patpatmok commented 5 years ago

same here, but I am running the homebridge on Synology docker (x86_64-alpine-linux-musl)

VannaDii commented 5 years ago

Also seeing Error: make nodesodium exited with code null using sudo and --unsafe-perm on CentOS Linux release 7.6.1810 (Core)

poudenes commented 5 years ago

Tried almost everything thats on internet. Also tried it on a fresh clear install of Rasbian Stretch on a different RPi. No luck at all.

PatricioooAG commented 5 years ago

MacOS. After a lots of try's ( homebridge are install already :

$ brew install libsodium

$ brew install autoconf

$ brew install libtool

$ brew install automake

( with sudo don't work ) $ npm install -g pponce/homebridge-apple-tv --unsafe-perm

and $ homebridge ( to pair after edit .json )

poudenes commented 5 years ago

:( to bad. I'll give it up. searched the whole internet and tried every possible solution. But the error:


    at ChildProcess.<anonymous> (/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287:19)
    at ChildProcess.emit (events.js:189:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! code ELIFECYCLE                                                                                                                                                                                                         
npm ERR! errno 1
npm ERR! sodium@2.0.3 install: `node install.js --install'
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sodium@2.0.3 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/2019-02-06T05_40_08_096Z-debug.log```

Pop-up all the time. So no Apple TV Support in Alexa for me then...
Im not that geek to solve this as well
Tangston311 commented 5 years ago

After some trial and error I managed to get this up and running on both a Mac and a Pi:

On MacOS (I already had Homebrew installed):

  1. brew install libsodium
  2. brew install autoconf
  3. brew install libtool
  4. brew install automake
  5. npm install -g pponce/homebridge-apple-tv --unsafe-perm

Once I got it up and running on the Mac it paired to my AppleTV just fine per the ReadMe.

On PI:

  1. sudo apt-get update -y
  2. sudo apt-get upgrade -y
  3. sudo apt-get install libtool
  4. sudo apt-get install autoconf
  5. sudo npm install -g homebridge-apple-tv --unsafe-perm

Once I got it up and running on the Pi I encountered the issue mentioned in Issue 14 where the same AppleTV tried to pair more than once and crashed the plugin. I was able to get it working by manually pairing the AppleTV and disabling the PairSwitches per the notes in that issue.

poudenes commented 5 years ago

Hi @Tangston311,

Did everything on Pi as well what you post. But see at end the error again ...

root@raspberrypi:/var/log# sudo apt-get update -y
Geraakt:1 http://archive.raspberrypi.org/debian stretch InRelease
Geraakt:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Geraakt:3 https://deb.nodesource.com/node_10.x stretch InRelease
Pakketlijsten worden ingelezen... Klaar

root@raspberrypi:/var/log# sudo apt-get upgrade -y
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
Opwaardering wordt doorgerekend... Klaar
0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.

root@raspberrypi:/var/log# sudo apt-get install libtool
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
libtool is reeds de nieuwste versie (2.4.6-2).
0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.

root@raspberrypi:/var/log# sudo apt-get install autoconf
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
autoconf is reeds de nieuwste versie (2.69-10).
0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.

root@raspberrypi:/var/log# sudo npm install -g homebridge-apple-tv --unsafe-perm

sodium@2.0.3 preinstall /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium
node install.js --preinstall

Static libsodium was not found at /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.

(THEN A LONG LOG FILE, SEEMS ALL OK BUT THEN:)

Error: make nodesodium exited with code null at ChildProcess. (/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287:19) at ChildProcess.emit (events.js:189:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) npm ERR! code ELIFECYCLE
npm ERR! errno 1 npm ERR! sodium@2.0.3 install: node install.js --install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sodium@2.0.3 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/2019-02-26T21_29_44_590Z-debug.log

zabaya commented 5 years ago

Do u use docker? Cause i've run into the same problem over and over. Apparently my docker was alpine based so instead of saying: apt-get update i need to use apk update, apk add libtool inside of the docker container instead of on whole the system. When you run it on the whole system it will say that everything is installed. But not inside of your container.

fugazzy commented 5 years ago

I am running in the same problem, but the fix does not seem to work for me: oznu/homebridge:no-avahi on Synology docker (DS918+)

apk update apk add libtool apk add autoconf apk add automake still does not install - `In file included from ../src/crypto_sign_ed25519.cc:8: ../src/include/node_sodium.h:51:73: warning: 'v8::Localv8::Object v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations] unsigned long long NAME ## _size = Buffer::Length(info[i]->ToObject()); \ ^ ../src/include/node_sodium.h:67:5: note: in expansion of macro 'GET_ARG_AS' GET_ARG_AS(i, NAME, TYPE); \ ^~~~~~ ../src/include/node_sodium.h:76:5: note: in expansion of macro 'GET_ARG_AS_LEN' GET_ARG_AS_LEN(i, NAME, MAXLEN, unsigned char*) ^~~~~~ ../src/include/node_sodium.h:106:53: note: in expansion of macro 'GET_ARG_AS_UCHAR_LEN'

define ARG_TO_UCHAR_BUFFER_LEN(NAME, MAXLEN) GET_ARG_AS_UCHAR_LEN(_arg, NAME, MAXLEN); _arg++

^~~~~~~~ ../src/crypto_sign_ed25519.cc:77:5: note: in expansion of macro 'ARG_TO_UCHAR_BUFFER_LEN' ARG_TO_UCHAR_BUFFER_LEN(secretKey, crypto_sign_ed25519_SECRETKEYBYTES); ^~~~~~~ /homebridge/node_modules/sodium/install.js:287 throw new Error(cmdLine + ' exited with code ' + code); ^ Error: make nodesodium exited with code null at ChildProcess. (/homebridge/node_modules/sodium/install.js:287:19) at ChildProcess.emit (events.js:189:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) npm WARN homebridge No description npm WARN homebridge No repository field. npm WARN homebridge No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sodium@2.0.3 install: node install.js --install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sodium@2.0.3 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/2019-05-02T20_43_09_529Z-debug.log `

zabaya commented 5 years ago

@fugazzy i’ve got my setup working with another plugin: homebridge-dacp a lot easier to install.

fugazzy commented 5 years ago

OK I might try dacp

fugazzy commented 5 years ago

@zabaya

@fugazzy i’ve got my setup working with another plugin: homebridge-dacp a lot easier to install.

I do not geht this to work either: dns service error: unknown Did you have any issues?

DarKOrange75 commented 5 years ago

Same f...g libsodium error here, I am stuck for 2 days now :-(

PierreBrisorgueil commented 4 years ago

same bug on my side raspberry

adidoes commented 4 years ago

For people still running into this, you must use node version 8. It's the only thing that worked for me.

sadanro100 commented 4 years ago

@adidoes that worked! thank you