Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not start Apache Server #250

Open
rainbowsource opened this issue Feb 5, 2023 · 23 comments
Open

Can not start Apache Server #250

rainbowsource opened this issue Feb 5, 2023 · 23 comments

Comments

@rainbowsource
Copy link

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
Copy link
Author

rainbowsource commented Feb 5, 2023

UBuntu 22.04

Commit 4eb8b14

@teddysun
Copy link
Owner

teddysun commented Feb 5, 2023

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

@rainbowsource
Copy link
Author

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

@rainbowsource
Copy link
Author

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

@fexlinux
Copy link

fexlinux commented Feb 7, 2023

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

@fexlinux
Copy link

fexlinux commented Feb 8, 2023

with rocky linux it works very well

@rainbowsource
Copy link
Author

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

@rainbowsource
Copy link
Author

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

@fitzwar
Copy link

fitzwar commented Mar 3, 2023

i'm getting the same error too on Ubuntu 20.04

@rainbowsource
Copy link
Author

rainbowsource commented Mar 6, 2023

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
Copy link
Author

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

@fitzwar
Copy link

fitzwar commented Mar 7, 2023

@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
Copy link

fitzwar commented Mar 22, 2023

@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
Copy link

fitzwar commented Mar 28, 2023

Any update on the fix ? still having issues

@SamB-GB
Copy link

SamB-GB commented Mar 30, 2023

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.

@benzntech
Copy link

Same issue in ubuntu 20.04

@rick001
Copy link

rick001 commented Jun 6, 2023

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

@arsidoo
Copy link

arsidoo commented Jul 14, 2023

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?

@johnycage
Copy link

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.

@rainbowsource
Copy link
Author

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.

@johnycage
Copy link

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.

@imowen
Copy link

imowen commented Oct 15, 2023

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:~#

@johnycage
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants