# Dependency conflict between avahi-libdns and mDNSResponder



## giorgiov (May 24, 2014)

Hi all,
I’m trying to `pkg upgrade` my packages and I get a conflict between Avahi and mDNS:


```
Conflict found on path /usr/local/lib/libdns_sd.so between avahi-libdns-0.6.31_1(net/avahi-libdns) and mDNSResponder-544(net/mDNSResponder)
```

Looking at the output from pkg(8) above the quoted line I see:


```
Upgrades have been requested for the following 69 packages:

	Installing mDNSResponder: 544
```

which is correct because mDNSResponder is _not_ installed. 

My questions are:
1. how can I find out which package to be upgraded requires mDNSResponder to be _installed_? My hypothesis is that a newer version of a package now requires mDNSResponder, but I don’t know to confirm it.
2. how should I deal with this conflict? 

Any pointers or help really appreciated.

Thanks.


----------



## Crivens (May 24, 2014)

*Re: Dependency conflict between avahi-libdns and mDNSRespond*

That could be print/cups. But you would need to check for yourself.


----------



## giorgiov (May 24, 2014)

*Re: Dependency conflict between avahi-libdns and mDNSRespond*

That’s it, Crivens! 

As a temporary countermeasure, would it be useful to lock the cups package? Or is there a way to basically skip upgrading this package?


----------



## romanaOne (Nov 9, 2018)

Sorry to necropost, but this problem is still here: I have a bunch of KDE packages that will be UNINSTALLED if I uninstall avahi-libdns.

I was trying to install android-tools-adb to do some phone rooting, but it pulls in mDNSResponder...which conflicts with avahi-libdns, the uninstallation of which would remove heaps of kde packages.

The avahi-libdns is just one file. I'm not sure how to proceed.


```
Checking integrity... done (1 conflicting)
  - mDNSResponder-878.70.2 conflicts with avahi-libdns-0.7 on /usr/local/lib/libdns_sd.so
Checking integrity... done (0 conflicting)
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        android-tools-adb: 9.0.0.r3_1
        mDNSResponder: 878.70.2

Installed packages to be REINSTALLED:
        avahi-libdns-0.7

Number of packages to be installed: 2
Number of packages to be reinstalled: 1

The process will require 3 MiB more space.
42 KiB to be downloaded.
```


```
>pkg remove avahi-libdns
.
.
.

Installed packages to be REMOVED:
        avahi-libdns-0.7
        kf5-kdnssd-5.51.0
        ktorrent-5.1.1
        krfb-18.08.2
        krdc-18.08.2
        libkdegames-18.08.2_1
        kshisen-18.08.2_1
        knavalbattle-18.08.2_1
        kio-extras-18.08.2_1
        kfourinline-18.08.2_1
        kdenetwork-18.08.2
        picmi-18.08.2_1
        ktuberling-18.08.2_1
        ksquares-18.08.2_1
        ksirk-18.08.2_1
        kpat-18.08.2_1
        kollision-18.08.2_1
        kolf-18.08.2_1
        knetwalk-18.08.2_1
        kmines-18.08.2_1
        kmahjongg-18.08.2_1
        klines-18.08.2_1
        klickety-18.08.2_1
        kjumpingcube-18.08.2_1
        kiriki-18.08.2_1
        killbots-18.08.2_1
        kdiamond-18.08.2_1
        kbreakout-18.08.2_1
        kbounce-18.08.2_1
        kblocks-18.08.2_1
        kblackbox-18.08.2_1
        katomic-18.08.2_1
        kapman-18.08.2_1
        granatier-18.08.2_1
        bovo-18.08.2_1
        bomber-18.08.2_1
        kdegames-18.08.2
        dolphin-18.08.2
        kde-baseapps-18.08.2

Number of packages to be removed: 39

The operation will free 194 MiB.

Proceed with deinstalling packages? [y/N]: Hell No!
```


----------



## SirDice (Nov 9, 2018)

Turn MDNSRESPONDER off on devel/android-tools-adb.


----------



## Crivens (Nov 9, 2018)

SirDice please allow me to add that this needs the android tools to be build from ports.


----------



## romanaOne (Nov 10, 2018)

ok, so I compiled the port with portmaster with MDNSERPONDER off and now pkg update nags me about changed options.  Maybe someday I'll set up a poudriere repo, but the android-tools-adb package contains just one binary file, which got copied to my home directory before uninstallation.  pkg doesn't need to know.


----------



## ShelLuser (Nov 19, 2018)

romanaOne said:


> ok, so I compiled the port with portmaster with MDNSERPONDER off and now pkg update nags me about changed options.


Obviously. Don't mix ports and packages, that's a recipe for disaster.


----------



## crashcoredump (Feb 3, 2021)

As of today, 02-02-2021 (incidentally, it's the Groundhog Day) the problem still exists:

`pkg: mDNSResponder-1096.40.7 conflicts with avahi-libdns-0.8 (installs files into the same place).  Problematic file: /usr/local/lib/libdns_sd.so`


----------



## SirDice (Feb 3, 2021)

Both applications are different, not-compatible, implementations of the same service. So they're always going to conflict. Some ports depend on mDNSresponder, some ports depend on Avahi, and some ports allow you to switch which one you want/need. The official packages however are always built using the default options and that, unfortunately, means some packages have dependency conflicts with other packages. Wherever possible those conflicts are avoided but it's not always possible to completely eliminate them.


----------



## crashcoredump (Feb 9, 2021)

SirDice said:


> Both applications are different, not-compatible, implementations of the same service. So they're always going to conflict. Some ports depend on mDNSresponder, some ports depend on Avahi, and some ports allow you to switch which one you want/need. The official packages however are always built using the default options and that, unfortunately, means some packages have dependency conflicts with other packages. Wherever possible those conflicts are avoided but it's not always possible to completely eliminate them.


It's not about conflicts, it's about dependency hell resolutions and better pkg/port/application dependency management. It's cool though, efforts are underway to resolve these issues once and for all.


----------



## ziomario (Sep 18, 2021)

```
root@marietto:/usr/home/marietto # pkg install kde5

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (2 conflicting)
  - mDNSResponder-1310.120.71 conflicts with avahi-libdns-0.8 on /usr/local/lib/libdns_sd.so
  - mDNSResponder-1310.120.71 conflicts with avahi-libdns-0.8 on /usr/local/lib/libdns_sd.so
Checking integrity... done (0 conflicting)
The following 3 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
    android-tools-adb: 29.0.6_1
    scrcpy: 1.17

New packages to be INSTALLED:
    kde5: 5.22.5.21.08.1

Number of packages to be removed: 2
Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[1/3] Deinstalling scrcpy-1.17...
[1/3] Deleting files for scrcpy-1.17: 100%
[2/3] Deinstalling android-tools-adb-29.0.6_1...
[2/3] Deleting files for android-tools-adb-29.0.6_1: 100%
[3/3] Installing kde5-5.22.5.21.08.1...
[3/3] Extracting kde5-5.22.5.21.08.1: 100%
=====
Message from kde5-5.22.5.21.08.1:

--
===>   NOTICE:

This port is deprecated; you may wish to reconsider installing it:

Uses EOL Python 2.7 via deskutils/kdepim.

It is scheduled to be removed on or after 2021-06-23.

root@marietto:/usr/home/marietto # pkg install kde5

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
```


----------



## sidetone (Sep 19, 2021)

Zeroconf needs to stop being a hardwired dependency. Instead, there needs to be package messages for these programs that say to install the implementation you wish to use. Same with CUPS.

Hardwiring dependencies like this causes a lot of problems, and it forces a lot of unnecessary reinstalls


----------



## grahamperrin@ (Sep 19, 2021)

crashcoredump said:


> … efforts are underway to resolve these issues …



Can you elaborate? Thanks.


----------



## grahamperrin@ (Sep 19, 2021)

ziomario said:


> ```
> root@marietto:/usr/home/marietto # pkg install kde5
> …
> ```




x11/kde5 requires x11/kde-baseapps <https://www.freshports.org/x11/kde-baseapps/#dependencies>
… requires x11-fm/dolphin <https://www.freshports.org/x11-fm/dolphin/#dependencies>
… requires devel/kio-extras <https://www.freshports.org/devel/kio-extras/#dependencies>
… requires dns/kf5-kdnssd <https://www.freshports.org/dns/kf5-kdnssd/#dependencies>
… requires *net/avahi-libdns* <https://www.freshports.org/net/avahi-libdns/#dependencies>


----------



## ziomario (Sep 19, 2021)

at some point it installs also akonadi server,that crashes everytime.


----------



## grahamperrin@ (Sep 19, 2021)

ziomario said:


> akonadi server,that crashes



▶ Akonadi won't start | The FreeBSD Forums


----------



## ziomario (Sep 19, 2021)

yes,I read it. But I haven't been able to fix it. So at the end I've removed akonadi with all the dependencies.


----------

