在 WSL2 中安装 OpenLDAP 时出错

在 WSL2 中安装 OpenLDAP 时出错

我正在尝试将 OpenLDAP 设置为安全 LDAP 的非安全代理,以支持旧版应用程序,以便我们可以完成向 Azure Active Directory 的迁移。我正在尝试使用 WSL2(Pengwin)在我的系统上安装 OpenLDAP,但出现此错误:

Errors were encountered while processing:
 slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up slapd (2.4.49+dfsg-4) ...
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-... done.
  Moving old database directory to /var/backups:
  - directory unknown... done.
  Creating initial configuration... done.
  Creating LDAP directory... failed.
Loading the initial configuration from the ldif file () failed with
the following error while running slapadd:
    5ea1ae7a => mdb_next_id: get failed: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid (-30782)
    5ea1ae7a => mdb_tool_entry_put: cursor_open failed: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid (-30782)
    slapadd: could not add entry dn="dc=localdomain" (line=1): cursor_open failed: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid (-30782)
    5ea1ae7a mdb_tool_entry_close: database dc=localdomain: txn_commit failed: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid (-30782)
dpkg: error processing package slapd (--configure):
 installed slapd package post-installation script subprocess returned error exit status 1

我已经尝试从源代码构建 OpenLDAP,但由于缺少 Berkeley DB 中的依赖项而失败。Pengwin 是基于 Debian 的发行版,我找不到适用于新 Debian 发行版的 Berkeley DB 6 软件包。

相关内容