Strange httpd.conf error when installing HTTP2

cumanzor

Member
Jul 14, 2017
9
1
3
Costa Rica
cPanel Access Level
Root Administrator
Good day everyone,

I'm installing the latest (and fresh) http2 module via ea4, but upon installing I see this on the log

Code:
httpd: Syntax error on line 27 of /etc/apache2/conf/httpd.conf: Syntax error on line 2 of /etc/apache2/conf.modules.d/485_mod_http2.conf: Cannot load modules/mod_http2.so into server: /etc/apache2/modules/mod_http2.so: undefined symbol: nghttp2_session_callbacks_set_on_invalid_header_callback
Am I missing something?

Currently using: cPanel & WHM 64.0 (build 32)

Production server is like 4 years old so I expect some older conf making some trouble.

Regards,
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
undefined symbol: nghttp2_session_callbacks_set_on_invalid_header_callback
Hello,

This can also happen if your system is linking to a previously installed nghttp2 library. You can verify if that's the case by running a command like this:

Code:
ldconfig -p | grep libnghttp2
If you see a reference to a path such as "/opt/nghttp2/lib" in the output, then your system is linking to the wrong library. To correct this, run the following command to verify the correct RPM is installed:

Code:
rpm -qf /usr/lib64/libnghttp2.so.14
The output should look like this:

Code:
# rpm -qf /usr/lib64/libnghttp2.so.14
ea-libnghttp2-1.20.0-2.2.1.cpanel.x86_64
If so, proceed to edit the /etc/ld.so.conf.d/nghttp2.conf file so that it uses the following line:

Code:
/usr/lib64
Then, run the following commands to complete the installation:

Code:
ldconfig
yum install ea-apache24-mod_http2
Thank you.