Solved Can't locate API module structure `ssl_module' in file /usr/local/libexec/apache24/mod_ssl.so: Undefined symbol "ssl_module"

FreeBSD 13.2 p10

All of a sudden I'm getting
Code:
Can't locate API module structure `ssl_module' in file /usr/local/libexec/apache24/mod_ssl.so: Undefined symbol "ssl_module"

when trying to start Apache. I only found the issue out as a result of acme.sh saying
Code:
httpd: Syntax error on line 148 of /usr/local/etc/apache24/httpd.conf: Can't locate API module structure `ssl_module' in file /usr/local/libexec/apache24/mod_ssl.so: Undefined symbol "ssl_module"
as my website was running perfectly fine that is until I rebooted it!!

I've tried re-installing mod_ssl but that's made no difference.

PHP version is 8.2 and the mod_ssl.so file is in the correct location and is dated 6th April 2024.

Any ideas?
 
Any updates I build from ports.

The only thing I have noticed but don't know if it makes any difference is that if I issue a openssl version command is that the version is
Code:
OpenSSL 1.1.1t-freebsd  7 Feb 2023
which is way off the latest version.
 
Careful of your PATH, /usr/bin/openssl is hit first, that's the OpenSSL that came with the OS. Try /usr/local/bin/openssl.
 
I had a similar problem because there were self made software using the 1.1.1 -version. The FreeBSD 13 pkg want’s to install a different version.

Using ldd to list binary files dependencies helped to realize the cause of the error.
 
What's in /etc/make.conf? Did you set DEFAULT_VERSIONS for SSL?
 
Careful of your PATH, /usr/bin/openssl is hit first, that's the OpenSSL that came with the OS. Try /usr/local/bin/openssl.

If I run whereis I get

Code:
whereis openssl
openssl: /usr/bin/openssl /usr/share/openssl/man/man1/openssl.1.gz /usr/src/secure/usr.bin/openssl
 
I had a similar problem because there were self made software using the 1.1.1 -version. The FreeBSD 13 pkg want’s to install a different version.

Using ldd to list binary files dependencies helped to realize the cause of the error.
I did update to freeBSD 13.2 on December 28th 2023 from 12.4 but I've not had any issues with Apache24 since.

Apologies for being a novice here but what am I running ldd on? mod_ssl,so ?
 
Yes, ldd /usr/local/libexec/apache24/mod_ssl.so

Code:
# ldd /usr/local/libexec/apache24/mod_ssl.so
/usr/local/libexec/apache24/mod_ssl.so:
        libssl.so.111 => /usr/lib/libssl.so.111 (0x36aa26195000)
        libcrypto.so.111 => /lib/libcrypto.so.111 (0x36aa26cb3000)
        libcrypt.so.5 => /lib/libcrypt.so.5 (0x36aa25ed6000)
        libthr.so.3 => /lib/libthr.so.3 (0x36aa277e0000)
        libc.so.7 => /lib/libc.so.7 (0x36aa21cbd000)
 
Result is

Code:
/usr/local/libexec/apache24/mod_ssl.so:
libssl.so.111 => /usr/lib/libssl.so.111 (0x52273625000)
libcrypto.so.111 => /lib/libcrypto.so.111 (0x522746cd000)
libcrypt.so.5 => /lib/libcrypt.so.5 (0x52276666000)
libthr.so.3 => /lib/libthr.so.3 (0x5227586c000)
libc.so.7 => /lib/libc.so.7 (0x522715be000)
 
Well it's now working but I had to delete apr which as a result of doing so removed apache24 and mod_php82

Code:
# pkg delete apr

# cd /usr/ports/www/apache24
# make install clean

# cd /usr/ports/www/mod_php82
# make install clean

 
Back
Top