lamp
lamp copied to clipboard
Can not start Apache Server
httpd: Syntax error on line 159 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_http2.so into server: /usr/local/apache/modules/mod_http2.so: undefined symbol: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation
UBuntu 22.04
Commit 4eb8b148734ad80cf6f1ed81bccae8e3cd102cea
ldconfig -p | grep libnghttp2
→ confirm
ll /usr/lib/libnghttp2.*
→ confirm
ll /usr/lib64/libnghttp2.*
→ confirm
rm -fv /usr/lib/libnghttp2.*
→ delete libnghttp2 old lib
rm -fv /usr/lib64/libnghttp2.*
→ delete libnghttp2 old lib
wget https://github.com/nghttp2/nghttp2/releases/download/v1.51.0/nghttp2-1.51.0.tar.gz
tar zxf nghttp2-1.51.0.tar.gz
cd nghttp2-1.51.0
./configure --prefix=/usr --enable-lib-only
make && make install && ldconfig
Sorry, it seems like after I did that it still doesn't work, same error.
Do I do this before installing LAMP, or after installing it? I did this after installation.
rainbowsource , you were able to fix it by doing it before installation?
with rocky linux it works very well
I solved this problem perfectly using CentOS. Looks like an ubuntu issue...
@fexlinux No matter whether it is installed first or later, it cannot be solved.
i'm getting the same error too on Ubuntu 20.04
fitzwar I can't solve this problem for now, only switch to CentOS (version 7.6) to solve this problem. Ubuntu 20.04 and 22.04 neither will work.
I think we should @ the developer. @teddysun This really should be a problem, and it cannot be solved by the way you mentioned above.
@teddysun do you have a timeline when we can deploy on Ubuntu 20.04 /22.04 as alot of our clients rely on this for Ubuntu. Thanks
@teddysun any update on the fix for Ubuntu 20.04 / 22.04 as we rely heavily on your script for installing for our clients ? thank you
Any update on the fix ? still having issues
Also seen this issue on Debian 11. I had to comment out the https/2 module for now as I couldn't find a fix for the problem.
Same issue in ubuntu 20.04
Same here, I am on ubuntu 20.04 I can't proceed without commenting out http_2 @teddysun do we have any timeline on this? Is this issue being looked into?
ll /usr/lib64/libnghttp2.*
--> ls: cannot access '/usr/lib64/libnghttp2.*': No such file or directory
httpd: Syntax error on line 159 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_http2.so into server: /usr/local/apache/modules/mod_http2.so: undefined symbol: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation
I have also same problem. can't fix with anything. anyone can install fresh without any issue?
httpd: Syntax error on line 159 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_http2.so into server: /usr/local/apache/modules/mod_http2.so: undefined symbol: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation
I have also same problem. can't fix with anything. anyone can install fresh without any issue?
Quick workaround is to comment out httpd.conf line that loads mod_http2 by adding # at the beginning of the line.
httpd: Syntax error on line 159 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_http2.so into server: /usr/local/apache/modules/mod_http2.so: undefined symbol: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation
I have also same problem. can't fix with anything. anyone can install fresh without any issue?
Quick workaround is to comment out httpd.conf line that loads mod_http2 by adding # at the beginning of the line.
But if you doing this, HTTP 2 just disappeared in place.
httpd: Syntax error on line 159 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_http2.so into server: /usr/local/apache/modules/mod_http2.so: undefined symbol: nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation
I have also same problem. can't fix with anything. anyone can install fresh without any issue?
Quick workaround is to comment out httpd.conf line that loads mod_http2 by adding # at the beginning of the line.
But if you doing this, HTTP 2 just disappeared in place.
Try a2enmod to enable http2 after LAMP setup.
ldconfig -p | grep libnghttp2
→ confirmll /usr/lib/libnghttp2.*
→ confirmll /usr/lib64/libnghttp2.*
→ confirmrm -fv /usr/lib/libnghttp2.*
→ delete libnghttp2 old librm -fv /usr/lib64/libnghttp2.*
→ delete libnghttp2 old lib
wget https://github.com/nghttp2/nghttp2/releases/download/v1.51.0/nghttp2-1.51.0.tar.gz
tar zxf nghttp2-1.51.0.tar.gz
cd nghttp2-1.51.0
./configure --prefix=/usr --enable-lib-only
make && make install && ldconfig
按照这个操作之后,有一个小错误,秋大你抽时间看一下。 [Sun Oct 15 10:00:16 AM UTC 2023] Created Let's Encrypt SSL Certificate success [Sun Oct 15 10:00:16 AM UTC 2023] Added SSL certificate for virtual host [mydomain.com] success [Sun Oct 15 10:00:16 AM UTC 2023] Reloading the Apache config file... [Sun Oct 15 10:00:16 AM UTC 2023] Error: Reload failed. Apache config file had an error, please fixed it and try again root@test:~#
ldconfig -p | grep libnghttp2
→ confirmll /usr/lib/libnghttp2.*
→ confirmll /usr/lib64/libnghttp2.*
→ confirmrm -fv /usr/lib/libnghttp2.*
→ delete libnghttp2 old librm -fv /usr/lib64/libnghttp2.*
→ delete libnghttp2 old libwget https://github.com/nghttp2/nghttp2/releases/download/v1.51.0/nghttp2-1.51.0.tar.gz
tar zxf nghttp2-1.51.0.tar.gz
cd nghttp2-1.51.0
./configure --prefix=/usr --enable-lib-only
make && make install && ldconfig
按照这个操作之后,有一个小错误,秋大你抽时间看一下。 [Sun Oct 15 10:00:16 AM UTC 2023] Created Let's Encrypt SSL Certificate success [Sun Oct 15 10:00:16 AM UTC 2023] Added SSL certificate for virtual host [mydomain.com] success [Sun Oct 15 10:00:16 AM UTC 2023] Reloading the Apache config file... [Sun Oct 15 10:00:16 AM UTC 2023] Error: Reload failed. Apache config file had an error, please fixed it and try again root@test:~#
This issue is different than OG. May there's configuration error in your case. Please try
apachectl -t.
to check if you get syntax OK.