30

I'm trying to build a demo project using Bonjour, following this tutorial, but i'm getting this error:

error: dns_sd.h: No such file or directory

It happens on this line:

#include <dns_sd.h>

Where do I get that header file?

3
  • Does this help: stackoverflow.com/questions/4341179/… ?
    – vahancho
    Oct 25, 2013 at 8:43
  • They don't mention where they got the header and libs from, though.
    – sashoalm
    Oct 25, 2013 at 8:48
  • 1
    Does this help ? sudo aptitude install libavahi-compat-libdnssd-dev
    – plop
    Apr 23, 2014 at 15:05

3 Answers 3

71

I just had this error on Ubuntu while trying to compile a project. This helped:

sudo apt-get install libavahi-compat-libdnssd-dev
2
  • Thanks that also resolved the issue with installing dnssd ruby gem.
    – Guy C
    Dec 29, 2016 at 2:21
  • Did not help me: libavahi-compat-libdnssd-dev is already the newest version
    – sh37211
    Jan 11, 2021 at 18:08
2

You can find the mDNSResponder daemon code here: http://www.opensource.apple.com/source/mDNSResponder/

You can download a tar file here: http://www.opensource.apple.com/tarballs/mDNSResponder/

1
  • The latest version is mDNSResponder-379.38.1.tar.gz Oct 25, 2013 at 8:57
1

You can use Avahi configured with mdnsresponder-compat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.