grover / homebridge-dacp

Remotely control Apple TV and iTunes via HomeKit.
MIT License
151 stars 14 forks source link

fatal error: dns_sd.h: No such file or directory #66

Open esamecar opened 5 years ago

esamecar commented 5 years ago

Hi,

I've tried installing homebridge-dacp via hoobs on an pi 3+ an receive the following error message:

> mdns@2.5.1 install /usr/local/lib/node_modules/homebridge-dacp/node_modules/mdns
> node-gyp rebuild

make: Entering directory '/usr/local/lib/node_modules/homebridge-dacp/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:
../src/mdns.hpp:32:10: fatal error: dns_sd.h: No such file or directory
 #include <dns_sd.h>
          ^~~~~~~~~~
compilation terminated.
make: *** [dns_sd_bindings.target.mk:162: Release/obj.target/dns_sd_bindings/src/dns_sd.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-dacp/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:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.19.58-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/homebridge-dacp/node_modules/mdns
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mdns@2.5.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mdns@2.5.1 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!     /home/hoobs/.npm/_logs/2019-08-18T16_27_03_408Z-debug.log

Command failed. Please review log for details.

Any help would be appriciated because the plugin seems highly interesting to me. Thanks!

sfeakes commented 4 years ago

You don't have an mdns dev library installed. Run below.

sudo apt-get install libavahi-compat-libdnssd-dev