Resolving package conflicts (pkg set -o?)

Matthew Seaman matthew at FreeBSD.org
Thu Aug 16 13:44:18 UTC 2018


On 10/08/2018 18:10, Norman Gray wrote:
> When installing the 'ceph' package, I get an error:
> 
> pkg: openldap-client-2.4.46 conflicts with openldap-sasl-client-2.4.46
> (installs files into the same place).  Problematic file:
> /usr/local/bin/ldapadd
> 
> I'm not sure how best to resolve this.  Can anyone offer advice?
> 
> This happens because I've installed the openldap-sasl-client package in
> preference to openldap-client (or rather, the nss-pam-ldapd-sasl package
> installs the former rather than the latter).  I take it that the two
> packages would be broadly equivalent in function from the point of view
> of dependencies.  However I'm not sure what the real difference is
> between these two alternatives.
> 

This is a pretty well-known and longstanding problem with pkg(8) and
using the standard project compiled packages.  What happens is that pkg
records dependencies very strictly -- on the specific version of a
package.  This means you cannot just substitute one package with a
similar equivalent -- ldap-client for ldap-sasl-client.

So if you install package A that depends on ldap-client and then want to
install package B that depends on ldap-sasl-client you are going to be a
very unhappy bunny.

Now, there are two possible solutions to this.

The first is to build your own packages.  That way you can make sure
everything depends on your choice of whatever dependency you prefer and
pkg(8) won't be nagging you about CONFLICTS.  Which is not really a
satisfactory response when all you want to do is quickly install
something and have it working P.D.Q.

The second is the new 'flavours' mechanism.  This exists for eg. python
or php or various other possibilities.  The result is that eg. any
python application will be available from the pkg repository for either
python-2.7 or python-3.6 and as an end user you can switch between the
two fairly easily.  The problem here is that no-one has yet implemented
an LDAP flavour.  Sorry.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20180815/5e83739e/attachment.sig>


More information about the freebsd-questions mailing list