# Conflicting packages openldap-sasl-client & openldap-client



## mca2 (Dec 26, 2019)

I'm running FreeBSD 12.0-p12 and installed a bunch of package directly with `pkg install` and others by compiling ports in /usr/ports. But upgrading ports gives me conflicts:

```
# pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (92 candidates): 100%
Processing candidates (92 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

# portmaster -aydbg --no-confirm
[...]
===> openldap-sasl-client-2.4.48 conflicts with installed package(s):
openldap-client-2.4.48
They will not build together.
Please remove them first with pkg delete.
Stop.
make[1]: stopped in /usr/ports/net/openldap24-sasl-client
*** Error code 1

Stop.
make: stopped in /usr/ports/net/openldap24-sasl-client
```
ok, let's try to remove one of them:

```
# pkg delete openldap-sasl-client
No packages matched for pattern 'openldap-sasl-client'
```
Ok, the other one

```
# pkg delete openldap-client
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 4 packages (of 0 packages in the universe):
Installed packages to be REMOVED:
openldap-client-2.4.48
php72-ldap-7.2.26
samba48-4.8.12_4
zabbix42-frontend-4.2.6_1
Number of packages to be removed: 4
The operation will free 218 MiB.
Proceed with deinstalling packages? [y/N]:
```
Hell, no! I don't want to remove all those other packages. Any idea how to fix this?


----------



## mca2 (Dec 26, 2019)

Scrolling a bit further up in the log revealed

```
===>>> Launching child to install databases/mysql57-client
===>>> All >> databases/mysql57-client (1/3)
===>>> Currently installed version: mysql57-client-5.7.27
===>>> Port directory: /usr/ports/databases/mysql57-client
===>>> Starting check for build dependencies
===>>> Gathering dependency list for databases/mysql57-client from ports
===>>> Launching child to install net/openldap24-sasl-client
===>>> All >> mysql57-client-5.7.27 >> net/openldap24-sasl-client (2/3)
===>>> Port directory: /usr/ports/net/openldap24-sasl-client
===>>> Starting check for build dependencies
===>>> Gathering dependency list for net/openldap24-sasl-client from ports
===>>> Dependency check complete for net/openldap24-sasl-clie
===>>> All >> mysql57-client-5.7.27 >> net/openldap24-sasl-client (2/3)
===> Cleaning for openldap-sasl-client-2.4.48
===> openldap-sasl-client-2.4.48 conflicts with installed package(s): openldap-client-2.4.48
```

So I did


```
databases/mysql57-client# make reinstall
```
and things moved on from there


----------



## SirDice (Dec 27, 2019)

This is one of the reasons why we generally recommend not to mix ports and packages. It's really easy to screw up your dependencies that way. 

Your main problem is that you enabled GSSAPI on net/openldap24-client, which causes it to be built as net/openldap24-sasl-client. Either turn off GSSAPI or build everything that depends on OpenLDAP from ports and set `WANT_OPENLDAP_SASL=yes` in make.conf.

The official packages are built with GSSAPI turned off and thus will always depend on net/openldap24-client.


----------



## mca2 (Jun 15, 2020)

I've removed the make.conf completely, but when running `portmaster -aydbg --no-confirm` I still get the errors below. Manually performing `databases/mysql57-client# make reinstall` work as a work around. But what am I missing to fix this permanently? 
	
	



```
===>>> Starting build for ports that need updating <<<===
===>>> Launching child to install databases/mysql57-client
===>>> All >> databases/mysql57-client (1/9)
===>>> Currently installed version: mysql57-client-5.7.30_1
===>>> Port directory: /usr/ports/databases/mysql57-client
===>>> Starting check for build dependencies
===>>> Gathering dependency list for databases/mysql57-client from ports
===>>> Launching child to install net/openldap24-sasl-client
===>>> All >> mysql57-client-5.7.30_1 >> net/openldap24-sasl-client (2/9)
===>>> Port directory: /usr/ports/net/openldap24-sasl-client
===>>> Starting check for build dependencies
===>>> Gathering dependency list for net/openldap24-sasl-client from ports
===>>> Dependency check complete for net/openldap24-sasl-client
===>>> All >> mysql57-client-5.7.30_1 >> net/openldap24-sasl-client (2/9)
===>  Cleaning for openldap-sasl-client-2.4.50
===>  openldap-sasl-client-2.4.50 conflicts with installed package(s): 

      openldap-client-2.4.50

      They install files into the same place.

      You may want to stop build with Ctrl + C.

===>  License OPENLDAP accepted by the user
===>   openldap-sasl-client-2.4.50 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by openldap-sasl-client-2.4.50 for building
===>  openldap-sasl-client-2.4.50 conflicts with installed package(s): 

      openldap-client-2.4.50

      They will not build together.

      Please remove them first with pkg delete.

*** Error code 1
```


----------

