The slapd binary has the wrong runtime path for finding libperl.so.
Openldap must be rebuilt after the perl major or minor version changes.
% readelf -hd /usr/bin/slapd
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Position-Independent Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x220fc
Start of program headers: 52 (bytes into file)
Start of section headers: 2094940 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 9
Size of section headers: 40 (bytes)
Number of section headers: 29
Section header string table index: 28
Dynamic section at offset 0x1f60b8 contains 39 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libldap.so.2]
0x00000001 (NEEDED) Shared library: [liblber.so.2]
0x00000001 (NEEDED) Shared library: [libltdl.so.7]
0x00000001 (NEEDED) Shared library: [libperl.so]
0x00000001 (NEEDED) Shared library: [libodbc.so.2]
0x00000001 (NEEDED) Shared library: [libsystemd.so.0]
0x00000001 (NEEDED) Shared library: [libsasl2.so.3]
0x00000001 (NEEDED) Shared library: [libuuid.so.1]
0x00000001 (NEEDED) Shared library: [libcrypt.so.2]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3]
0x0000000f (RPATH) Library rpath: [/usr/lib/perl5/5.36/core_perl/CORE]