Asterisk 20 compile on Rocky Linux 9 - Failed to initialize libsrtp

I have compiles Asterisk 20 on Rocky Linux 9. Asterisk doesn’t start as a result of

[May 26 11:15:12] WARNING[155972]: res_srtp.c:1238 res_srtp_init: Failed to initialize libsrtp
[May 26 11:15:12] ERROR[155972]: loader.c:2524 load_modules: *** Failed to load module
[May 26 11:15:12] ERROR[155972]: asterisk.c:4039 check_init: Module initialization failed. ASTERISK EXITING!

I found some users saying libsrtp not being a valid file but ldd shows it to be valid:

[root@pbx ~]# ldd /usr/lib64/ (0x00007ffc1bff7000) => /usr/lib64/ (0x00007fbf9e5e2000) => /usr/lib64/ (0x00007fbf9e59f000) => /usr/lib64/ (0x00007fbf9e200000) => /usr/lib64/ (0x00007fbf9e56b000) => /usr/lib64/ (0x00007fbf9e564000) => /usr/lib64/ (0x00007fbf9e55f000)
/lib64/ (0x00007fbf9e73d000)

[root@pbx ~]# ldd /lib64/ (0x00007fffde1ed000) => /usr/lib64/ (0x00007f2dd0a37000) => /usr/lib64/ (0x00007f2dd09f4000) => /usr/lib64/ (0x00007f2dd0600000) => /usr/lib64/ (0x00007f2dd09c0000) => /usr/lib64/ (0x00007f2dd09b9000) => /usr/lib64/ (0x00007f2dd09b4000)
/lib64/ (0x00007f2dd0b92000)

Package libsrtp-2.3.0-7.el9.x86_64 is already installed.
Package libsrtp-devel-2.3.0-7.el9.x86_64 is already installed.

If I don’t noload => asterisk works fine. I have not gotten to the point of testing webrtc but suspect it won’t work without srtp.

Others resolved it by building libsrtp themselves, instead of using the package:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.