Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on Raspberry Pi. #11

Closed
MichMich opened this issue Sep 29, 2016 · 12 comments
Closed

Unable to install on Raspberry Pi. #11

MichMich opened this issue Sep 29, 2016 · 12 comments

Comments

@MichMich
Copy link
Contributor

Awesome package! Works wonderfull on my Mac. Unfortunately, I'm unable to install it on my mac

sudo npm install -g homekit2mqtt
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/usr/local/lib/node_modules/homekit2mqtt/node_modules/mdns/build'
  CXX(target) Release/obj.target/dns_sd_bindings/src/dns_sd.o
In file included from ../src/dns_sd.cpp:1:0:
../src/mdns.hpp:32:20: fatal error: dns_sd.h: No such file or directory
 #include <dns_sd.h>
                    ^
compilation terminated.
dns_sd_bindings.target.mk:142: recipe for target 'Release/obj.target/dns_sd_bindings/src/dns_sd.o' failed
make: *** [Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homekit2mqtt/node_modules/mdns/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.1.19-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homekit2mqtt/node_modules/mdns
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm info lifecycle mdns@2.3.3~install: Failed to exec install script
/usr/local/lib
└── (empty)

npm ERR! Linux 4.1.19-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homekit2mqtt"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! mdns@2.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mdns@2.3.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mdns package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs mdns
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls mdns
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/npm-debug.log
npm ERR! code 1

Any idea?

@hobbyquaker
Copy link
Owner

hobbyquaker commented Sep 29, 2016

did you do sudo apt-get install libavahi-compat-libdnssd-dev before installing homekit2mqtt?

@MichMich
Copy link
Contributor Author

That solved the issue, but unfortunately, I ran into another issue:

gyp info it worked if it ends with ok
gyp info using node-gyp@3.3.1
gyp info using node@5.10.1 | linux | arm
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/build'
make: *** No rule to make target '../.node-gyp/5.10.1/include/node/common.gypi', needed by 'Makefile'.  Stop.
make: Leaving directory '/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.1.19-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/binding/bignum.node" "--module_name=bignum" "--module_path=/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/binding"
gyp ERR! cwd /usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/binding/bignum.node --module_name=bignum --module_path=/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/binding' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/homekit2mqtt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:100:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:850:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Linux 4.1.19-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/homekit2mqtt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum
node-pre-gyp ERR! node -v v5.10.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.30
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/binding/bignum.node --module_name=bignum --module_path=/usr/local/lib/node_modules/homekit2mqtt/node_modules/bignum/binding' (1)
npm info lifecycle bignum@0.12.5~install: Failed to exec install script
/usr/local/lib
└── (empty)

npm ERR! Linux 4.1.19-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homekit2mqtt"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! bignum@0.12.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bignum@0.12.5 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bignum
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bignum
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/npm-debug.log
npm ERR! code 1

@hobbyquaker
Copy link
Owner

I guess this is a unresolved issue with Bignum on Node 5/6. Could you try if it works with Node 4?

@MichMich
Copy link
Contributor Author

Unfortunately I can't downgrade Node on that Pi since it's necessary for an other project. I'll just keep running your app on my Mac. If you happen to find a solution, it would be great to hear.

@hobbyquaker
Copy link
Owner

hobbyquaker commented Sep 29, 2016

Perhaps it's worth a try: sudo npm install -g homekit2mqtt --unsafe-perm
Let me know if this works, otherwise I will investigate on this on sunday.

Also you could use https://github.com/tj/n to handle different node versions on the same system.

@MichMich
Copy link
Contributor Author

Works perfect! App is running on my Raspberry Pi now. Thanks for the fabulous script! Works like a charm!

@hobbyquaker
Copy link
Owner

Great, good to hear, thanks :-)
If you need some inspiration on what to connect to MQTT my "awesome" link list might be worth a look: https://github.com/hobbyquaker/awesome-mqtt
Regards,
Sebastian

@MichMich
Copy link
Contributor Author

This is the project I used it for: http://michaelteeuw.nl/tagged/curtains

I'll probably write a blogpost about your library soon, cause you saved me a lot of work. ;)

@hobbyquaker
Copy link
Owner

Wow, cool project. Automated curtains would fit into my house very good. Have to talk to my wife ;-)
I would be happy if you mention my project in your Blog!

@MichMich
Copy link
Contributor Author

Will do (in a week or two). I'll send you the link when it's posted.

@MichMich
Copy link
Contributor Author

As promised I wrote a link about homekit2mqtt: http://michaelteeuw.nl/post/151621813122/homekit-curtains

@hobbyquaker
Copy link
Owner

cool!!! thx! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants