lamp icon indicating copy to clipboard operation
lamp copied to clipboard

Can not start Apache Server

Open rainbowsource opened this issue 2 years ago • 23 comments

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

rainbowsource avatar Feb 05 '23 08:02 rainbowsource

UBuntu 22.04

Commit 4eb8b148734ad80cf6f1ed81bccae8e3cd102cea

rainbowsource avatar Feb 05 '23 08:02 rainbowsource

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

teddysun avatar Feb 05 '23 08:02 teddysun

Sorry, it seems like after I did that it still doesn't work, same error.

rainbowsource avatar Feb 05 '23 08:02 rainbowsource

Do I do this before installing LAMP, or after installing it? I did this after installation.

rainbowsource avatar Feb 05 '23 08:02 rainbowsource

rainbowsource , you were able to fix it by doing it before installation?

fexlinux avatar Feb 07 '23 20:02 fexlinux

with rocky linux it works very well

fexlinux avatar Feb 08 '23 20:02 fexlinux

I solved this problem perfectly using CentOS. Looks like an ubuntu issue...

rainbowsource avatar Feb 10 '23 11:02 rainbowsource

@fexlinux No matter whether it is installed first or later, it cannot be solved.

rainbowsource avatar Feb 10 '23 11:02 rainbowsource

i'm getting the same error too on Ubuntu 20.04

fitzwar avatar Mar 03 '23 09:03 fitzwar

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.

rainbowsource avatar Mar 06 '23 14:03 rainbowsource

I think we should @ the developer. @teddysun This really should be a problem, and it cannot be solved by the way you mentioned above.

rainbowsource avatar Mar 06 '23 14:03 rainbowsource

@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

fitzwar avatar Mar 07 '23 09:03 fitzwar

@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

fitzwar avatar Mar 22 '23 12:03 fitzwar

Any update on the fix ? still having issues

fitzwar avatar Mar 28 '23 12:03 fitzwar

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.

SamB-GB avatar Mar 30 '23 08:03 SamB-GB

Same issue in ubuntu 20.04

benzntech avatar Mar 30 '23 10:03 benzntech

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

rick001 avatar Jun 06 '23 11:06 rick001

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?

arsidoo avatar Jul 14 '23 01:07 arsidoo

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.

johnycage avatar Aug 02 '23 12:08 johnycage

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.

rainbowsource avatar Aug 04 '23 07:08 rainbowsource

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.

johnycage avatar Aug 05 '23 14:08 johnycage

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

按照这个操作之后,有一个小错误,秋大你抽时间看一下。 [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:~#

imowen avatar Oct 15 '23 10:10 imowen

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

按照这个操作之后,有一个小错误,秋大你抽时间看一下。 [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.

johnycage avatar Nov 07 '23 14:11 johnycage