Below is the bottom stanza from LD_DEBUG, showing the linker error. I hope it’s helpful.
7105: 7105: object=/lib64/ld-linux-x86-64.so.2 [0] 7105: no scope 7105: 7105: 7105: calling init: /usr/lib/asterisk/modules/app_while.so 7105: 7105: opening file=/usr/lib/asterisk/modules/app_while.so [0]; direct_opencount=1 7105: 7105: 7105: file=/usr/lib/asterisk/modules/res_http_post.so [0]; dynamically loaded by asterisk [0] 7105: file=/usr/lib/asterisk/modules/res_http_post.so [0]; generating link map 7105: dynamic: 0x00007f70276e2be8 base: 0x00007f70276dc000 size: 0x0000000000007110 7105: entry: 0x00007f70276de3c0 phdr: 0x00007f70276dc040 phnum: 9 7105: 7105: 7105: file=libgmime-3.0.so.0 [0]; needed by /usr/lib/asterisk/modules/res_http_post.so [0] 7105: find library=libgmime-3.0.so.0 [0]; searching 7105: search cache=/etc/ld.so.cache 7105: trying file=/lib/x86_64-linux-gnu/libgmime-3.0.so.0 7105: 7105: file=libgmime-3.0.so.0 [0]; generating link map 7105: dynamic: 0x00007f70276c29f0 base: 0x00007f7027657000 size: 0x000000000007d540 7105: entry: 0x00007f702766f580 phdr: 0x00007f7027657040 phnum: 9 7105: 7105: 7105: file=libnsl.so.1 [0]; needed by /lib/x86_64-linux-gnu/libgmime-3.0.so.0 [0] 7105: find library=libnsl.so.1 [0]; searching 7105: search cache=/etc/ld.so.cache 7105: trying file=/lib/x86_64-linux-gnu/libnsl.so.1 7105: 7105: file=libnsl.so.1 [0]; generating link map 7105: dynamic: 0x00007f7027653d78 base: 0x00007f702763e000 size: 0x0000000000018a58 7105: entry: 0x00007f70276426b0 phdr: 0x00007f702763e040 phnum: 9 7105: 7105: 7105: file=libgpgme.so.11 [0]; needed by /lib/x86_64-linux-gnu/libgmime-3.0.so.0 [0] 7105: find library=libgpgme.so.11 [0]; searching 7105: search cache=/etc/ld.so.cache 7105: trying file=/lib/x86_64-linux-gnu/libgpgme.so.11 7105: 7105: file=libgpgme.so.11 [0]; generating link map Inconsistency detected by ld.so: ../elf/dl-tls.c: 73: _dl_next_tls_modid: Assertion `result <= GL(dl_tls_max_dtv_idx) + 1' failed!