I have an Ubuntu server and I ran sudo apt upgrade this morning, now Nginx won’t start.
This is what I get when I run systemctl status Nginx:
nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2024-07-01 15:53:40 UTC; 36min ago Docs: man:nginx(8) Process: 3329 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) CPU: 16ms Jul 01 15:53:40 server-name systemd[1]: Starting A high performance web server and a reverse proxy server... Jul 01 15:53:40 server-name nginx[3329]: 2024/07/01 15:53:40 [emerg] 3329#3329: module "/usr/share/nginx/modules/ngx_ssl_ct_module.so" version 1024000 instead of 1026001 in /e> Jul 01 15:53:40 server-name nginx[3329]: nginx: configuration file /etc/nginx/nginx.conf test failed Jul 01 15:53:40 server-name systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jul 01 15:53:40 server-name systemd[1]: nginx.service: Failed with result 'exit-code'. Jul 01 15:53:40 server-name systemd[1]: Failed to start A high performance web server and a reverse proxy server.
When I try to look at the error.log file for Nginx it is blank. When I run sudo nginx -t
I get this:
2024/07/01 16:33:51 [emerg] 3618#3618: module "/usr/share/nginx/modules/ngx_ssl_ct_module.so" version 1024000 instead of 1026001 in /etc/nginx/modules-enabled/50-mod-ssl-ct.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed
This is what I get when I run apt --fix-broken install
:
Reading package lists... Done Building dependency tree... Done Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: geoip-database libgeoip1 libnginx-mod-brotli libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-ssl-ct libnginx-mod-stream libnginx-mod-stream-geoip nginx-core Use 'apt autoremove' to remove them. The following additional packages will be installed: libnginx-mod-brotli libnginx-mod-ssl-ct The following packages will be upgraded: libnginx-mod-brotli libnginx-mod-ssl-ct 2 upgraded, 0 newly installed, 0 to remove and 36 not upgraded. 11 not fully installed or removed. Need to get 0 B/11.4 kB of archives. After this operation, 7168 B disk space will be freed. Do you want to continue? [Y/n] Y Setting up nginx (1.26.1-2+ubuntu22.04.1+deb.sury.org+1) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details. invoke-rc.d: initscript nginx, action "start" failed. × nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2024-07-01 16:34:58 UTC; 20ms ago Docs: man:nginx(8) Process: 3695 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) CPU: 16ms Jul 01 16:34:58 server-name systemd[1]: Starting A high performance web server and a reverse proxy server... Jul 01 16:34:58 server-name nginx[3695]: 2024/07/01 16:34:58 [emerg] 3695#3695: module "/usr/share/nginx/modules/ngx_ssl_ct_module.so" version 1024000 instead of 1026001 in /etc/nginx/modules-enabled/50-mod-ssl-ct.conf:1 Jul 01 16:34:58 server-name nginx[3695]: nginx: configuration file /etc/nginx/nginx.conf test failed Jul 01 16:34:58 server-name systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jul 01 16:34:58 server-name systemd[1]: nginx.service: Failed with result 'exit-code'. Jul 01 16:34:58 server-name systemd[1]: Failed to start A high performance web server and a reverse proxy server. dpkg: error processing package nginx (--configure): installed nginx package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of libnginx-mod-http-brotli-filter: libnginx-mod-http-brotli-filter depends on nginx-abi-1.26.1-1; however: Package nginx-abi-1.26.1-1 is not installed. Package nginx which provides nginx-abi-1.26.1-1 is not configured yet. dpkg: error processing package libnginx-mod-http-brotli-filter (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of libnginx-mod-http-brotli-static: libnginx-mod-http-brotli-static depends on nginx-abi-1.26.1-1; however: Package nginx-abi-1.26.1-1 is not installed. Package nginx which provides nginx-abi-1.26.1-1 is not configured yet. dpkg: error processing package libnginx-mod-http-brotli-static (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of nginx-common: nginx-common depends on nginx (>= 1.26.1-2+ubuntu22.04.1+deb.sury.org+1); however: Package nginx is not configured yet. nginx-common depends on nginx (<< 1.26.1-2+ubuntu22.04.1+deb.sury.org+1.1~); however: Package nginx is not configured yet. dpkg: error processing package nginx-common (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already Errors were encountered while processing: nginx libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static nginx-common needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried apt-cache policy libnginx-mod-brotli
and got this:
libnginx-mod-brotli:
Installed: 1:1.0.0~rc+1.24.0-8+ubuntu22.04.1+deb.sury.org+1.24.0~1
Candidate: 1:1.0.0~rc+1.26.1-9+ubuntu22.04.1+deb.sury.org+8
Version table:
1:1.0.0~rc+1.26.1-9+ubuntu22.04.1+deb.sury.org+8 500
500 https://ppa.launchpadcontent.net/ondrej/nginx/ubuntu jammy/main amd64 Packages
*** 1:1.0.0~rc+1.24.0-8+ubuntu22.04.1+deb.sury.org+1.24.0~1 100
100 /var/lib/dpkg/status
New contributor
jsjs12345 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.