The Debian package libreoffice-core (which is described in the Debian repositories as containing " the architecture-dependent core files of LibreOffice," and which is itself a dependency for libreoffice-writer and similar packages) has an absolute dependency (i.e., the relationship of the packages is depends, not recommends or suggests) on libldap-2.4-2 (described as "the run-time libraries for the OpenLDAP (Lightweight Directory Access Protocol) servers and clients").

Why? How is a word processor whose most common use case by far is editing files stored locally, on the same machine it is running on, so dependent on a protocol for accessing remote directories that it cannot even be configured if the latter is not present? Is this just a dependency classification error (i.e., the relationship should actually be recommends or suggests), or does libreoffice actually somehow need OpenLDAP installed in order to function?

  • 2
    It doesn't need it to function, it's just the whim of the package maintainer. LDAP is used for the collaboration functionality, address books, etc. when working with other users.
    – CR.
    Jun 24, 2022 at 0:49

2 Answers 2


libreoffice-core ships /usr/lib/libreoffice/program/soffice.bin, and that is linked against

libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f55a8c9e000)

The package build tools therefore automatically add a dependency on the package providing that library, libldap-2.4-2. It’s a strong dependency because without it, LibreOffice as built in Debian simply wouldn’t start.

Of course LibreOffice could be changed to support dynamically loading LDAP support as needed, but that’s a rather invasive change to make in a package. Another option would be to build it without LDAP support, but some people do actually need it, e.g. to access shared address books, which Writer can use for mail-merges among other things.

Presumably the package maintainer chose to provide LDAP-based features for everyone, instead of introducing complexity in order to allow users to choose. The LDAP library adds less than a megabyte of dependencies, which is a very small amount compared to LibreOffice as a whole.

  • 1
    Okay, the example of use for mail merges makes this make a bit more sense to me. I still don't like it as a philosophical matter, but it's now in the realm of "one more symptom (and a small one, compared to many of the others) of a general approach to office software that I wish wasn't dominant" rather than "bizarre and inexplicable." Jun 24, 2022 at 9:11
  • I understand your concern; Debian is a general-purpose distribution, so package maintainers tend to err on the “enable everything potentially useful” side of things. Some packages do provide various configurations (see the various vim packages for example); but I’ve worked on packages where doing so just led to endless complaints about having to choose. There are far fewer maintainers than users, and the “one size fits all” approach preserves the former at the expense of some of the latter. Jun 24, 2022 at 9:17
  • The LibreOffice package source does provide many configuration knobs if you want to build your own package with only the features you use; in particular, it can be built without LDAP support. Jun 24, 2022 at 9:19
  • There are of course other distributions which do cater for users who want to configure their package builds in detail; Gentoo is a good example (with its USE flags). Jun 24, 2022 at 9:19
  • @ChrisHenry it's more that the package is either built against X or not. If it's built against X it needs X to load; if it isn't it doesn't. Plenty of even more random things end up being dependencies, but this approach is quite common in *nix software, because it's easy, and once upon a time everyone built their own software. In this case there happens to be an office-related reason for the dependency, but it could easily be completely unrelated to the software's business logic.
    – 2e0byo
    Jun 24, 2022 at 18:34

Yes, LibreOffice use the LDAP library:

$ apt-rdepends libreoffice | grep '^libldap'

Which is used to access LDAP address books.

And, in any case it is used only to read (not write) LDAP directories, if and when an LDAP connection is created. Which seems like a reasonable capability for base or Calc (if needed). I do not know if Write could access such libraries, but I would not be surprised if it does.

Doesn't seem like any problematic issue, IMO.

  • 1
    Writer can use address books for mail merges. Note that the question is about the dependency, so apt-rdepends only confirms the existence of the dependency, it doesn’t explain it — the maintainer could have mistakenly added it to the package metadata. Jun 24, 2022 at 7:17
  • @StephenKitt Confirmation is all that that command was meant to provide. The why is addressed in the written description text. Is it not? Anything positive to add? Jun 24, 2022 at 7:25
  • 1
    Yes, your description explains why it is used. Jun 24, 2022 at 7:53
  • It's a reasonable capability to provide, if the tools are available. I don't think it's a reasonable capability to require the tools for (even if doing so is quite cheap) in order to allow the program to be used at all. IMO, if a program can be used locally, it should be possible to install and run it (possibly with warnings) on a system with no networking software. If a program can be used without performing cryptography, it should be possible to install and run it on a system with no cryptographic software. Etc. But perhaps an office suite is an unrealistic place to expect such an approach. Jun 24, 2022 at 8:52
  • 1
    @ChrisHenry the dependency on libldap doesn’t introduce a dependency on networking software, it’s just a library. LibreOffice has dependencies on tons of libraries, and no single user is likely to use all of them. Jun 24, 2022 at 9:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .