oerdnj / deb.sury.org

Public bugreports for anything ppa:ondrej/*
800 stars 26 forks source link

Bump the nginx-abi-<ver> number to 1.25.5-1 to fix the broken dependencies #2118

Closed moerkey closed 2 months ago

moerkey commented 2 months ago

Frequently asked questions

JFYI: There is a typo in this template for bug reports. "consise" should be replaced by "concise". https://www.merriam-webster.com/dictionary/concise

Describe the bug nginx won't start after updating nginx in Ubuntu 22.04 (Jammy) with the repo nginx-mainline.

2024/04/17 13:21:47 [emerg] 504940#504940: module "/usr/share/nginx/modules/ngx_http_headers_more_filter_module.so" version 1025004 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-headers-more-filter.conf:1

I think that the module libnginx-mod-http-headers-more-filter needs to be updated too. After uninstalling the module, nginx just runs fine.

I tried several workarounds with downgrading nginx, replacing libnginx-mod-http-headers-more-filter with nginx-extras. But all failed in an endless dependency cycle, i.e.

apt-get install nginx-extras
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libnginx-mod-http-geoip2 : Depends: libnginx-mod-stream (< 1.25.4.1~) but 1.25.5-1+ubuntu22.04.1+deb.sury.org+1 is to be installed
 libnginx-mod-stream-geoip2 : Depends: libnginx-mod-stream (< 1.25.4.1~) but 1.25.5-1+ubuntu22.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
apt-get install nginx=1.25.4-1+ubuntu22.04.1+deb.sury.org+1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nginx : Depends: nginx-core (< 1.25.4-1+ubuntu22.04.1+deb.sury.org+1.1~) but it is not going to be installed or
                  nginx-full (< 1.25.4-1+ubuntu22.04.1+deb.sury.org+1.1~) but it is not going to be installed or
                  nginx-light (< 1.25.4-1+ubuntu22.04.1+deb.sury.org+1.1~) but it is not going to be installed or
                  nginx-extras (< 1.25.4-1+ubuntu22.04.1+deb.sury.org+1.1~) but it is not going to be installed
         Depends: nginx-core (>= 1.25.4-1+ubuntu22.04.1+deb.sury.org+1) but it is not going to be installed or
                  nginx-full (>= 1.25.4-1+ubuntu22.04.1+deb.sury.org+1) but it is not going to be installed or
                  nginx-light (>= 1.25.4-1+ubuntu22.04.1+deb.sury.org+1) but it is not going to be installed or
                  nginx-extras (>= 1.25.4-1+ubuntu22.04.1+deb.sury.org+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

apt-get install nginx=1.25.4-1+ubuntu22.04.1+deb.sury.org+1 nginx-core=1.25.4-1+ubuntu22.04.1+deb.sury.org+1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package nginx-core is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  nginx

E: Version '1.25.4-1+ubuntu22.04.1+deb.sury.org+1' for 'nginx-core' was not found

apt-cache policy nginx-core
nginx-core:
  Installed: (none)
  Candidate: 1.25.5-1+ubuntu22.04.1+deb.sury.org+1
  Version table:
     1.25.5-1+ubuntu22.04.1+deb.sury.org+1 500
        500 http://ppa.launchpad.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 Packages
     1.18.0-6ubuntu14.4 500
        500 http://mirror.easyname.at/ubuntu-archive jammy-updates/main amd64 Packages
     1.18.0-6ubuntu14.3 500
        500 http://mirror.easyname.at/ubuntu-archive jammy-security/main amd64 Packages
     1.18.0-6ubuntu14 500
        500 http://mirror.easyname.at/ubuntu-archive jammy/main amd64 Packages

To Reproduce Steps to reproduce the behavior:

  1. Install nginx with version 1.25.4-4+ubuntu22.04.1+deb.sury.org+1 and libnginx-mod-http-headers-more-filter with version 1:0.37+1.25.4-2+ubuntu22.04.1+deb.sury.org+.
  2. Update sources (apt-get update)
  3. Try to update packages (apt-get upgrade)

What steps did you take to resolve issue yourself before reporting it here Restore from backup.

Expected behavior Successful upgrade.

Distribution (please complete the following information):

Package(s) (please complete the following information):

libnginx-mod-http-headers-more-filter:
  Installed: 1:0.37+1.25.4-2+ubuntu22.04.1+deb.sury.org+4
  Candidate: 1:0.37+1.25.4-2+ubuntu22.04.1+deb.sury.org+4
  Version table:
 *** 1:0.37+1.25.4-2+ubuntu22.04.1+deb.sury.org+4 500
        500 http://ppa.launchpad.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     1.18.0-6ubuntu14.4 500
        500 http://mirror.easyname.at/ubuntu-archive jammy-updates/universe amd64 Packages
     1.18.0-6ubuntu14.3 500
        500 http://mirror.easyname.at/ubuntu-archive jammy-security/universe amd64 Packages
     1.18.0-6ubuntu14 500
        500 http://mirror.easyname.at/ubuntu-archive jammy/universe amd64 Packages
vintagesucks commented 2 months ago

Same issue with libnginx-mod-http-brotli-filter and nginx-mainline:

[emerg] 1#1: module "/usr/share/nginx/modules/ngx_http_brotli_filter_module.so" version 1025004 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-brotli-filter.conf:1

nginx

1.25.5-1+ubuntu22.04.1+deb.sury.org+1

libnginx-mod-brotli

1:1.0.0~rc+1.25.4-8+ubuntu22.04.1+deb.sury.org+1

RenatasDidysis commented 2 months ago

after update: ngx_http_headers_more_filter_module.so - broken

nginx -V nginx version: nginx/1.25.4

root@prod:~# nginx -t 2024/04/17 22:52:29 [emerg] 2072563#2072563: module "/usr/share/nginx/modules/ngx_http_headers_more_filter_module.so" version 1025004 instead of 1025005 in /etc/nginx/nginx.conf:5

oerdnj commented 2 months ago

I'm sorry for that. This whole concept of external nginx modules is broken by the fact that the modules needs to be recompiled with every minor version. This is absolutely stupid and it is going to make the packaging a living hell.

I can issue a rebuild for all modules in the repository, so they get rebuilt, but I'll have to come up with a method that doesn't break every time there's a new upstream version.

CryptoSiD commented 2 months ago

I'm sorry for that. This whole concept of external nginx modules is broken by the fact that the modules needs to be recompiled with every minor version. This is absolutely stupid and it is going to make the packaging a living hell.

I can issue a rebuild for all modules in the repository, so they get rebuilt, but I'll have to come up with a method that doesn't break every time there's a new upstream version.

It looks like the modules have been recompiled for "jammy" but not for "noble".

I'm able to install libnginx-mod-http-ndk libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-headers-more-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-rtmp from the jammy repo but with the noble repo, the packages aren't even available?

moerkey commented 2 months ago

For Jammy it is fine by now. Thank you @oerdnj

moerkey commented 2 months ago

Unfortunately, it was only a fix for libnginx-mod-http-headers-more-filter but some other modules are affacted too.

2024/04/18 08:20:17 [emerg] 2187558#2187558: module "/usr/share/nginx/modules/ngx_http_echo_module.so" version 1025004 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-echo.conf:1

2024/04/18 08:17:43 [emerg] 2186515#2186515: module "/usr/share/nginx/modules/ngx_http_dav_ext_module.so" version 1025004 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-dav-ext.conf:1

I uninstalled module libnginx-mod-http-dav-ext and then I uninstalled all other modules, which seem to be dependencies.

2024-04-18 08:24:05 remove libnginx-mod-http-auth-pam:amd64 1:1.5.5+1.25.5-2+ubuntu22.04.1+deb.sury.org+5 <none>
2024-04-18 08:24:05 remove libnginx-mod-http-geoip2:amd64 1:3.4+1.25.5-5+ubuntu22.04.1+deb.sury.org+5 <none>
2024-04-18 08:24:05 remove libnginx-mod-http-subs-filter:amd64 1:0.6.4+1.25.5-6+ubuntu22.04.1+deb.sury.org+5 <none>
2024-04-18 08:24:05 remove libnginx-mod-http-upstream-fair:amd64 1:0.0~git20120408.a18b409+1.25.5-5+ubuntu22.04.1+deb.sury.org+5 <none>
2024-04-18 08:24:05 remove libnginx-mod-stream-geoip2:amd64 1:3.4+1.25.5-5+ubuntu22.04.1+deb.sury.org+5 <none>
2024-04-18 08:24:06 remove libnginx-mod-stream:amd64 1.25.5-1+ubuntu22.04.1+deb.sury.org+1 <none>
2024-04-18 08:24:06 remove libnginx-mod-http-echo:amd64 1:0.63+1.25.4-6+ubuntu22.04.1+deb.sury.org+4 <none>
oerdnj commented 2 months ago

Both dav-ext and echo failed to build on amd64 for some reason. I've issued the rebuild now.

oerdnj commented 2 months ago

Don't close the issue yet until this is also fixed on Debian please.

moerkey commented 2 months ago

No problem, I won´t close it anymore. Because for now I have a solution for my environment. So happy fixing. :)

lroehrs commented 2 months ago

@oerdnj We're getting still an issue on jammy:

root@lb1:~# dpkg -l nginx\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name               Version                               Architecture Description
+++-==================-=====================================-============-=========================================================
ii  nginx              1.25.5-1+ubuntu22.04.1+deb.sury.org+1 amd64        small, powerful, scalable web/proxy server
un  nginx-abi-1.24.0-1 <none>                                <none>       (no description available)
ii  nginx-common       1.25.5-1+ubuntu22.04.1+deb.sury.org+1 all          small, powerful, scalable web/proxy server - common files
un  nginx-core         <none>                                <none>       (no description available)
un  nginx-doc          <none>                                <none>       (no description available)
ii  nginx-extras       1.25.5-1+ubuntu22.04.1+deb.sury.org+1 amd64        nginx web/proxy server (extended version)
un  nginx-light        <none>                                <none>       (no description available)
root@lb1:~# tail -2 /var/log/supervisor/program_nginx.error
2024/04/18 11:56:29 [emerg] 4750#4750: module "/usr/share/nginx/modules/ngx_http_lua_module.so" version 1025004 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-lua.conf:1
2024/04/18 11:56:32 [emerg] 4751#4751: module "/usr/share/nginx/modules/ngx_http_lua_module.so" version 1025004 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-lua.conf:1
root@lb1:~# dpkg -S /usr/lib/nginx/modules/ngx_http_lua_module.so
libnginx-mod-http-lua: /usr/lib/nginx/modules/ngx_http_lua_module.so
root@lb1:~# apt policy libnginx-mod-http-lua
libnginx-mod-http-lua:
  Installed: 1:0.10.26+1.25.4-2+ubuntu22.04.1+deb.sury.org+5
  Candidate: 1:0.10.26+1.25.4-2+ubuntu22.04.1+deb.sury.org+5
  Version table:
 *** 1:0.10.26+1.25.4-2+ubuntu22.04.1+deb.sury.org+5 500
        500 http://ppa.launchpad.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
root@lb1:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
oerdnj commented 2 months ago

OMG I finally found it:

# update the ABI version when:
# - nginx upstream has changed
# - a patch might change the ABI
# - a build-dependency has changed
# note that debian revision can increase without breaking ABI
#
# TODO: use $(DEB_VERSION_UPSTREAM)
nginx:abi=nginx-abi-1.25.5-1

The new Debian maintainer of nginx package hadn't automated this yet. At least I know about this and the future releases will not be broken like this.

oerdnj commented 2 months ago

Cease the updates until all the packages are rebuilt again (this issue will be closed).

oerdnj commented 2 months ago

And of all days, launchpad decided it has a time for everything:

Finished 1 hour ago (took 3 minutes, 17.9 seconds)

And still not installed in the repository...

oerdnj commented 2 months ago

LOL: https://ubuntu.social/@launchpadstatus/112286753813553221

Scheduled maintenance, April 18th 12.30 UTC. Expected downtime: 30 mins. PPA service will be affected.

We appreciate your patience and understanding.

oerdnj commented 2 months ago

Debian Buster/Bullseye/Bookworm packages for 1.25.5 are all green now on all architectures.

oerdnj commented 2 months ago

Ubuntu Focal/Jammy/Noble packages for 1.25.5 should be also ok except libnginx-mod-http-lua which is still building, but should be finished in a moment.

oerdnj commented 2 months ago

Some arm* packages are still in the build queue, but I am closing this as finished. Those couple missing will be done in few hours (depends on launchpad).

ComputerTinker commented 2 months ago

Hate to be a pest, but I'm still having difficulty doing a clean upgrade. Here's what I had installed initially:

libnginx-mod-brotli/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6]
libnginx-mod-http-geoip/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-http-image-filter/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-http-xslt-filter/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-mail/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-ssl-ct/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1:1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6]
libnginx-mod-stream-geoip/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-stream/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
nginx-common/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 all [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
nginx-core/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
nginx/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 all [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]

I made sure to do an apt update to get the latest packages. Then if I just do an 'apt upgrade' it threatens to remove several nginx packages:

ubuntu@onelink5:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  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 'sudo apt autoremove' to remove them.
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  python2.7-minimal redis-server libmagickwand-6.q16-6 redis-tools
  libmagickcore-6.q16-6 imagemagick-6-common python2.7 libpython2.7-minimal
  libpython2.7-stdlib
Learn more about Ubuntu Pro on AWS at https://ubuntu.com/aws/pro
The following NEW packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static ubuntu-pro-client
The following packages have been kept back:
  python3-update-manager update-manager-core
The following packages will be upgraded:
  coreutils ethtool libc-bin libc-dev-bin libc-devtools libc6 libc6-dev libldap-2.5-0 libldap-common libnginx-mod-brotli 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 libpython2.7-minimal libpython2.7-stdlib locales nginx nginx-common nginx-core nodejs openssh-client openssh-server openssh-sftp-server php8.2-bcmath php8.2-cli php8.2-common php8.2-curl php8.2-fpm
  php8.2-gd php8.2-gmp php8.2-intl php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-readline php8.2-sqlite3 php8.2-xml php8.2-zip php8.3-cli php8.3-common php8.3-opcache php8.3-phpdbg php8.3-readline python2.7 python2.7-minimal snapd
  ubuntu-advantage-tools ubuntu-core-launcher ubuntu-pro-client-l10n update-notifier-common
54 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
6 standard LTS security updates
Need to get 86.4 MB of archives.
After this operation, 1,159 kB disk space will be freed.
Do you want to continue? [Y/n] n

I first tried specifying that nginx-core be installed (so that it would stay installed), but apt was still threatening to uninstall several other packages:

ubuntu@onelink5:~$ sudo apt install nginx-core
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libnginx-mod-brotli libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static libnginx-mod-ssl-ct
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  debsuryorg-archive-keyring 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 nginx-common
Suggested packages:
  fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static
The following packages will be upgraded:
  libnginx-mod-brotli 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 nginx-common nginx-core
11 upgraded, 3 newly installed, 0 to remove and 45 not upgraded.
Need to get 1,101 kB of archives.
After this operation, 99.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] n

I then tried specifying several of the nginx packages such that the only thing which would be uninstalled would be the libnginx-mod-brotli package, which I saw in your other post has been replaced by the separate -filter and -static packages. When I proceeded with the upgrade, however, it took down my nginx:

ubuntu@onelink5:~$ sudo apt install nginx-core libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static libnginx-mod-ssl-ct
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libnginx-mod-brotli
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-brotli libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip nginx nginx-common
Suggested packages:
  fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static
The following packages will be upgraded:
  libnginx-mod-brotli 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 nginx-common nginx-core
11 upgraded, 3 newly installed, 0 to remove and 45 not upgraded.
Need to get 1,101 kB of archives.
After this operation, 99.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 debsuryorg-archive-keyring all 2024.02.05+ubuntu22.04.1+deb.sury.org+1 [4,326 B]
Get:2 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-stream amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [108 kB]
Get:3 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-stream-geoip amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [37.6 kB]
Get:4 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-ssl-ct amd64 1:1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6 [7,844 B]
Get:5 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-mail amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [76.0 kB]
Get:6 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-xslt-filter amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [40.9 kB]
Get:7 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-image-filter amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [42.5 kB]
Get:8 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 nginx-common all 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [64.0 kB]
Get:9 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-brotli-filter amd64 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6 [9,648 B]
Get:10 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-brotli-static amd64 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6 [7,588 B]
Get:11 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-brotli all 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6 [4,118 B]
Get:12 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 nginx-core all 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [33.1 kB]
Get:13 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 nginx amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [627 kB]
Get:14 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-geoip amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [38.5 kB]
Fetched 1,101 kB in 2s (481 kB/s)
Preconfiguring packages ...
Selecting previously unselected package debsuryorg-archive-keyring.
(Reading database ... 117013 files and directories currently installed.)
Preparing to unpack .../00-debsuryorg-archive-keyring_2024.02.05+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking debsuryorg-archive-keyring (2024.02.05+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../01-libnginx-mod-stream_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-stream (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../02-libnginx-mod-stream-geoip_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-stream-geoip (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../03-libnginx-mod-ssl-ct_1%3a1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6_amd64.deb ...
Unpacking libnginx-mod-ssl-ct (1:1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../04-libnginx-mod-mail_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-mail (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../05-libnginx-mod-http-xslt-filter_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../06-libnginx-mod-http-image-filter_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../07-nginx-common_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking nginx-common (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
dpkg: warning: unable to delete old directory '/var/www/html': Directory not empty
dpkg: warning: unable to delete old directory '/var/www': Directory not empty
Selecting previously unselected package libnginx-mod-http-brotli-filter.
dpkg: considering deconfiguration of libnginx-mod-brotli, which would be broken by installation of libnginx-mod-http-brotli-filter ...
dpkg: yes, will deconfigure libnginx-mod-brotli (broken by libnginx-mod-http-brotli-filter)
Preparing to unpack .../08-libnginx-mod-http-brotli-filter_1%3a1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6_amd64.deb ...
De-configuring libnginx-mod-brotli (1.25.3-1+ubuntu22.04.1+deb.sury.org+1), to allow installation of libnginx-mod-http-brotli-filter (1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6) ...
Unpacking libnginx-mod-http-brotli-filter (1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6) ...
Replacing files in old package libnginx-mod-brotli (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../09-nginx-core_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking nginx-core (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../10-nginx_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking nginx (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Setting up debsuryorg-archive-keyring (2024.02.05+ubuntu22.04.1+deb.sury.org+1) ...
Setting up nginx (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) ...
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
 * Upgrading binary nginx                                                                                                                                                                                                                              [fail]
invoke-rc.d: initscript nginx, action "upgrade" failed.
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
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 "restart" 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 Thu 2024-04-18 14:53:51 EDT; 10ms ago
       Docs: man:nginx(8)
    Process: 160910 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 7ms

Apr 18 14:53:51 onelink5 systemd[1]: Starting A high performance web server and a reverse proxy server...
Apr 18 14:53:51 onelink5 nginx[160910]: 2024/04/18 14:53:51 [emerg] 160910#160910: module "/usr/share/nginx/modules/ngx_http_geoip_module.so" version 1025003 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-geoip.conf:1
Apr 18 14:53:51 onelink5 nginx[160910]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 18 14:53:51 onelink5 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Apr 18 14:53:51 onelink5 systemd[1]: nginx.service: Failed with result 'exit-code'.
Apr 18 14:53:51 onelink5 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
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.25.5-1; however:
  Package nginx-abi-1.25.5-1 is not installed.
  Package nginx which provides nginx-abi-1.25.5-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 nginx-common:
 nginx-common depends on nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1); however:
  Package nginx is not configured yet.
 nginx-common depends on nginx (<< 1.25.5-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 the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 nginx
 libnginx-mod-http-brotli-filter
 nginx-common
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm guessing the key portion of that error is: [emerg] 160910#160910: module "/usr/share/nginx/modules/ngx_http_geoip_module.so" version 1025003 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-geoip.conf:1 Is that related to the ABI again?

Any help appreciated.

oerdnj commented 2 months ago

Hate to be a pest, but I'm still having difficulty doing a clean upgrade. Here's what I had installed initially:

libnginx-mod-brotli/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6]
libnginx-mod-http-geoip/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-http-image-filter/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-http-xslt-filter/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-mail/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-ssl-ct/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1:1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6]
libnginx-mod-stream-geoip/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
libnginx-mod-stream/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
nginx-common/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 all [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
nginx-core/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 amd64 [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]
nginx/now 1.25.3-1+ubuntu22.04.1+deb.sury.org+1 all [installed,upgradable to: 1.25.5-2+ubuntu22.04.1+deb.sury.org+1]

I made sure to do an apt update to get the latest packages. Then if I just do an 'apt upgrade' it threatens to remove several nginx packages:

ubuntu@onelink5:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  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 'sudo apt autoremove' to remove them.
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  python2.7-minimal redis-server libmagickwand-6.q16-6 redis-tools
  libmagickcore-6.q16-6 imagemagick-6-common python2.7 libpython2.7-minimal
  libpython2.7-stdlib
Learn more about Ubuntu Pro on AWS at https://ubuntu.com/aws/pro
The following NEW packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static ubuntu-pro-client
The following packages have been kept back:
  python3-update-manager update-manager-core
The following packages will be upgraded:
  coreutils ethtool libc-bin libc-dev-bin libc-devtools libc6 libc6-dev libldap-2.5-0 libldap-common libnginx-mod-brotli 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 libpython2.7-minimal libpython2.7-stdlib locales nginx nginx-common nginx-core nodejs openssh-client openssh-server openssh-sftp-server php8.2-bcmath php8.2-cli php8.2-common php8.2-curl php8.2-fpm
  php8.2-gd php8.2-gmp php8.2-intl php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-readline php8.2-sqlite3 php8.2-xml php8.2-zip php8.3-cli php8.3-common php8.3-opcache php8.3-phpdbg php8.3-readline python2.7 python2.7-minimal snapd
  ubuntu-advantage-tools ubuntu-core-launcher ubuntu-pro-client-l10n update-notifier-common
54 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
6 standard LTS security updates
Need to get 86.4 MB of archives.
After this operation, 1,159 kB disk space will be freed.
Do you want to continue? [Y/n] n

I first tried specifying that nginx-core be installed (so that it would stay installed), but apt was still threatening to uninstall several other packages:

ubuntu@onelink5:~$ sudo apt install nginx-core
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libnginx-mod-brotli libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static libnginx-mod-ssl-ct
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  debsuryorg-archive-keyring 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 nginx-common
Suggested packages:
  fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static
The following packages will be upgraded:
  libnginx-mod-brotli 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 nginx-common nginx-core
11 upgraded, 3 newly installed, 0 to remove and 45 not upgraded.
Need to get 1,101 kB of archives.
After this operation, 99.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] n

I then tried specifying several of the nginx packages such that the only thing which would be uninstalled would be the libnginx-mod-brotli package, which I saw in your other post has been replaced by the separate -filter and -static packages. When I proceeded with the upgrade, however, it took down my nginx:

ubuntu@onelink5:~$ sudo apt install nginx-core libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static libnginx-mod-ssl-ct
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libnginx-mod-brotli
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-brotli libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip nginx nginx-common
Suggested packages:
  fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
  debsuryorg-archive-keyring libnginx-mod-http-brotli-filter libnginx-mod-http-brotli-static
The following packages will be upgraded:
  libnginx-mod-brotli 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 nginx-common nginx-core
11 upgraded, 3 newly installed, 0 to remove and 45 not upgraded.
Need to get 1,101 kB of archives.
After this operation, 99.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 debsuryorg-archive-keyring all 2024.02.05+ubuntu22.04.1+deb.sury.org+1 [4,326 B]
Get:2 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-stream amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [108 kB]
Get:3 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-stream-geoip amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [37.6 kB]
Get:4 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-ssl-ct amd64 1:1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6 [7,844 B]
Get:5 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-mail amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [76.0 kB]
Get:6 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-xslt-filter amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [40.9 kB]
Get:7 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-image-filter amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [42.5 kB]
Get:8 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 nginx-common all 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [64.0 kB]
Get:9 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-brotli-filter amd64 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6 [9,648 B]
Get:10 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-brotli-static amd64 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6 [7,588 B]
Get:11 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-brotli all 1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6 [4,118 B]
Get:12 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 nginx-core all 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [33.1 kB]
Get:13 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 nginx amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [627 kB]
Get:14 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu jammy/main amd64 libnginx-mod-http-geoip amd64 1.25.5-2+ubuntu22.04.1+deb.sury.org+1 [38.5 kB]
Fetched 1,101 kB in 2s (481 kB/s)
Preconfiguring packages ...
Selecting previously unselected package debsuryorg-archive-keyring.
(Reading database ... 117013 files and directories currently installed.)
Preparing to unpack .../00-debsuryorg-archive-keyring_2024.02.05+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking debsuryorg-archive-keyring (2024.02.05+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../01-libnginx-mod-stream_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-stream (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../02-libnginx-mod-stream-geoip_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-stream-geoip (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../03-libnginx-mod-ssl-ct_1%3a1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6_amd64.deb ...
Unpacking libnginx-mod-ssl-ct (1:1.3.2+1.25.5-2+ubuntu22.04.1+deb.sury.org+6) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../04-libnginx-mod-mail_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-mail (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../05-libnginx-mod-http-xslt-filter_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../06-libnginx-mod-http-image-filter_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../07-nginx-common_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking nginx-common (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
dpkg: warning: unable to delete old directory '/var/www/html': Directory not empty
dpkg: warning: unable to delete old directory '/var/www': Directory not empty
Selecting previously unselected package libnginx-mod-http-brotli-filter.
dpkg: considering deconfiguration of libnginx-mod-brotli, which would be broken by installation of libnginx-mod-http-brotli-filter ...
dpkg: yes, will deconfigure libnginx-mod-brotli (broken by libnginx-mod-http-brotli-filter)
Preparing to unpack .../08-libnginx-mod-http-brotli-filter_1%3a1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6_amd64.deb ...
De-configuring libnginx-mod-brotli (1.25.3-1+ubuntu22.04.1+deb.sury.org+1), to allow installation of libnginx-mod-http-brotli-filter (1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6) ...
Unpacking libnginx-mod-http-brotli-filter (1:1.0.0~rc+1.25.5-8+ubuntu22.04.1+deb.sury.org+6) ...
Replacing files in old package libnginx-mod-brotli (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../09-nginx-core_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_all.deb ...
Unpacking nginx-core (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Preparing to unpack .../10-nginx_1.25.5-2+ubuntu22.04.1+deb.sury.org+1_amd64.deb ...
Unpacking nginx (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) over (1.25.3-1+ubuntu22.04.1+deb.sury.org+1) ...
Setting up debsuryorg-archive-keyring (2024.02.05+ubuntu22.04.1+deb.sury.org+1) ...
Setting up nginx (1.25.5-2+ubuntu22.04.1+deb.sury.org+1) ...
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
 * Upgrading binary nginx                                                                                                                                                                                                                              [fail]
invoke-rc.d: initscript nginx, action "upgrade" failed.
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
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 "restart" 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 Thu 2024-04-18 14:53:51 EDT; 10ms ago
       Docs: man:nginx(8)
    Process: 160910 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 7ms

Apr 18 14:53:51 onelink5 systemd[1]: Starting A high performance web server and a reverse proxy server...
Apr 18 14:53:51 onelink5 nginx[160910]: 2024/04/18 14:53:51 [emerg] 160910#160910: module "/usr/share/nginx/modules/ngx_http_geoip_module.so" version 1025003 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-geoip.conf:1
Apr 18 14:53:51 onelink5 nginx[160910]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 18 14:53:51 onelink5 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Apr 18 14:53:51 onelink5 systemd[1]: nginx.service: Failed with result 'exit-code'.
Apr 18 14:53:51 onelink5 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
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.25.5-1; however:
  Package nginx-abi-1.25.5-1 is not installed.
  Package nginx which provides nginx-abi-1.25.5-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 nginx-common:
 nginx-common depends on nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1); however:
  Package nginx is not configured yet.
 nginx-common depends on nginx (<< 1.25.5-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 the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 nginx
 libnginx-mod-http-brotli-filter
 nginx-common
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm guessing the key portion of that error is: [emerg] 160910#160910: module "/usr/share/nginx/modules/ngx_http_geoip_module.so" version 1025003 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-http-geoip.conf:1 Is that related to the ABI again?

Any help appreciated.

Could you please create a new issue out of this?

SirajCse commented 2 months ago

Installing package(s) with command apt-get -y install libnginx-mod-brotli libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-ssl-ct libnginx-mod-stream libnginx-mod-stream-geoip libnginx-mod-stream-geoip2 nginx-common nginx-core nginx-full .. Reading package lists... Building dependency tree... Reading state information... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: libnginx-mod-brotli : Depends: nginx-abi-1.25.5-1 libnginx-mod-http-auth-pam : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-brotli-filter : Depends: nginx-abi-1.25.5-1 libnginx-mod-http-brotli-static : Depends: nginx-abi-1.25.5-1 libnginx-mod-http-dav-ext : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-echo : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-geoip : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-geoip2 : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-image-filter : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-subs-filter : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-upstream-fair : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-xslt-filter : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-mail : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-ssl-ct : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-stream : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-stream-geoip : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-stream-geoip2 : Depends: nginx-abi-1.25.5-1 Recommends: nginx nginx-common : Depends: nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1) Depends: nginx (< 1.25.5-2+ubuntu22.04.1+deb.sury.org+1.1~) nginx-core : Depends: nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1) Depends: nginx (< 1.25.5-2+ubuntu22.04.1+deb.sury.org+1.1~) nginx-full : Depends: nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1) Depends: nginx (< 1.25.5-2+ubuntu22.04.1+deb.sury.org+1.1~) E: Unable to correct problems, you have held broken packages. .. install failed! No packages were installed. Check the messages above for the cause of the error.

CryptoSiD commented 2 months ago

Installing package(s) with command apt-get -y install libnginx-mod-brotli libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-geoip2 libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-ssl-ct libnginx-mod-stream libnginx-mod-stream-geoip libnginx-mod-stream-geoip2 nginx-common nginx-core nginx-full .. Reading package lists... Building dependency tree... Reading state information... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: libnginx-mod-brotli : Depends: nginx-abi-1.25.5-1 libnginx-mod-http-auth-pam : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-brotli-filter : Depends: nginx-abi-1.25.5-1 libnginx-mod-http-brotli-static : Depends: nginx-abi-1.25.5-1 libnginx-mod-http-dav-ext : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-echo : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-geoip : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-geoip2 : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-image-filter : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-subs-filter : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-upstream-fair : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-http-xslt-filter : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-mail : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-ssl-ct : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-stream : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-stream-geoip : Depends: nginx-abi-1.25.5-1 Recommends: nginx libnginx-mod-stream-geoip2 : Depends: nginx-abi-1.25.5-1 Recommends: nginx nginx-common : Depends: nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1) Depends: nginx (< 1.25.5-2+ubuntu22.04.1+deb.sury.org+1.1~) nginx-core : Depends: nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1) Depends: nginx (< 1.25.5-2+ubuntu22.04.1+deb.sury.org+1.1~) nginx-full : Depends: nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1) Depends: nginx (< 1.25.5-2+ubuntu22.04.1+deb.sury.org+1.1~) E: Unable to correct problems, you have held broken packages. .. install failed! No packages were installed. Check the messages above for the cause of the error.

Have you run "apt update" before trying to install those packages? I just tested from my side and they installed without issues.

ghostseven commented 2 months ago

This is still broken for me on 22.04.4 LTS

I have run 'apt update' before trying again.

`Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 6.5.11-7-pve x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro
Last login: Fri Apr 19 09:10:41 2024 from 2001:8b0:be36:a790::1:231
blake@polya:~$ sudo apt upgrade --fix-broken
[sudo] password for blake:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... 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 php8.2-mysql
Use 'sudo apt autoremove' to remove them.
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  gsasl-common imagemagick libiperf0 libjs-jquery-ui libopenexr25
  libmagickcore-6.q16-6-extra php-twig libgsasl7 iperf3 libmagickwand-6.q16-6
  imagemagick-6.q16 libmagickcore-6.q16-6 imagemagick-6-common
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following packages have been kept back:
  python3-update-manager update-manager-core
The following packages will be upgraded:
  libnginx-mod-brotli libnginx-mod-ssl-ct locales openssh-client openssh-server openssh-sftp-server ssh ubuntu-advantage-tools ubuntu-pro-client ubuntu-pro-client-l10n
10 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
15 not fully installed or removed.
1 standard LTS security update
Need to get 0 B/5,874 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Setting up nginx (1.25.5-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 Fri 2024-04-19 09:12:37 BST; 28ms ago
       Docs: man:nginx(8)
    Process: 1165537 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 26ms

Apr 19 09:12:37 polya systemd[1]: Starting A high performance web server and a reverse proxy server...
Apr 19 09:12:37 polya nginx[1165537]: 2024/04/19 09:12:37 [emerg] 1165537#1165537: module "/usr/share/nginx/modules/ngx_ssl_ct_module.so" version 1025004 instead of 1025005 in /etc/nginx/modules-enabled/50-mod-ssl-ct.conf:1
Apr 19 09:12:37 polya nginx[1165537]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 19 09:12:37 polya systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Apr 19 09:12:37 polya systemd[1]: nginx.service: Failed with result 'exit-code'.
Apr 19 09:12:37 polya 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.25.5-1; however:
  Package nginx-abi-1.25.5-1 is not installed.
  Package nginx which provides nginx-abi-1.25.5-1 is not configured yet.

dpkg: error processing package libnginx-mod-http-brotli-filter (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnginx-mod-http-brotli-static:
 libnginx-mod-http-brotli-static depends on nginx-abi-1.25.5-1; however:
  Package nginx-abi-1.25.5-1 is not installed.
  Package nginx which provides nginx-abi-1.25.5-1 is not configured yet.

dpkg: error processing package libnginx-mod-http-brotli-static (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nginx-common:
 nginx-common depends on nginx (>= 1.25.5-2+ubuntu22.04.1+deb.sury.org+1); however:
  Package nginx is not configured yet.
 nginx-common depends on nginx (<< 1.25.5-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
Errors were encountered while processing:
 nginx
 libnginx-mod-http-brotli-filter
 libnginx-mod-http-brotli-static
 nginx-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
blake@polya:~$`

Edit: some further info on unmet dependencies

sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libnginx-mod-brotli : Depends: nginx-abi-1.24.0-1 but it is not installable
 libnginx-mod-ssl-ct : Depends: nginx-abi-1.24.0-1 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Thanks :)

ghostseven commented 2 months ago

Further update to my issue, forcibly removing the libnginx-mod-brotli package with dpkg --remove libnginx-mod-brotli and then running apt update and apt upgrade --fix-broken it managed to install the libnginx-mod-ssl-ct package and resolve the issue.

I have not attempted to re-install libnginx-mod-brotli but I am guessing it will break.

cvick commented 2 months ago

Further update to my issue, forcibly removing the libnginx-mod-brotli package with dpkg --remove libnginx-mod-brotli and then running apt update and apt upgrade --fix-broken it managed to install the libnginx-mod-ssl-ct package and resolve the issue.

I have not attempted to re-install libnginx-mod-brotli but I am guessing it will break.

First, thanks for your reply - removing libnginx-mod-brotli fixed the issue and I was able to complete the upgrade. Second, after confirming nginx was back up and working, I reinstalled libnginx-mod-brotli and restarted nginx - nothing broke for me but YMMV.

oerdnj commented 2 months ago

I think I understand what is happening. More or less.

nginx-common postinst script has:

# Automatically added by dh_installsystemd/13.11.4
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
        if [ -d /run/systemd/system ]; then
                systemctl --system daemon-reload >/dev/null || true
                if [ -n "$2" ]; then
                        _dh_action=restart
                else
                        _dh_action=start
                fi
                deb-systemd-invoke $_dh_action 'nginx.service' >/dev/null || true
        fi
fi
# End automatically added section

Also nginx package postinst has:

if invoke-rc.d --quiet nginx status >/dev/null; then
  invoke-rc.d nginx upgrade || invoke-rc.d nginx restart
  exit $?
else
  if [ -z "$(ss -nlt 'sport = 80' | grep -v ^State)" ]; then
    invoke-rc.d nginx start || exit $?
  else
    echo "Not attempting to start NGINX, port 80 is already in use."
    exit 0
  fi
fi

This is wrong - it can't be restarted until all the modules are upgraded, but the Debian-upstream packages is restarting from multiple places.

The only place we need the restart is triggered restart:

case "$1" in
  abort-upgrade|abort-remove|abort-deconfigure|configure)
    ;;
  triggered)
    if invoke-rc.d --quiet nginx status >/dev/null; then
      echo "Triggering nginx reload ..."
      invoke-rc.d nginx reload || true
    fi
    exit 0
    ;;
  *)
    echo "postinst called with unknown argument \`$1'" >&2
    exit 1
    ;;
esac

I will work on solution with current Debian nginx maintainer because that's the place where it is ultimately broken in the first place.

oerdnj commented 2 months ago

I think this should not be all rebuilt and have correct dependencies on the 1.25.5 ABI. Please open new issue if you still have a problem, a pretty please provide complete information - I especially need to know results of apt-cache show <failing_package> and apt-cache policy <failing_package>. Please provide as much information as you can (properly formatted) as there could be a bit of information I might be missing included in the output. See here for an example of "the bit" that helped: https://github.com/oerdnj/deb.sury.org/issues/2119#issuecomment-2067689407

hrvoj3e commented 2 weeks ago

Further update to my issue, forcibly removing the libnginx-mod-brotli package with dpkg --remove libnginx-mod-brotli and then running apt update and apt upgrade --fix-broken it managed to install the libnginx-mod-ssl-ct package and resolve the issue.

I have not attempted to re-install libnginx-mod-brotli but I am guessing it will break.

This worked today when trying to solve this dependency problem on Ubuntu 20.04.6 LTS with nginx 1.26.1-1+ubuntu20.04.1+deb.sury.org+1

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 --remove libnginx-mod-brotli
apt --fix-broken install
apt install libnginx-mod-brotli # completed without errors
bc-0dp commented 2 weeks ago

@hrvoj3e HERO!

felixpenrose commented 2 weeks ago

This worked today when trying to solve this dependency problem on Ubuntu 20.04.6 LTS with nginx 1.26.1-1+ubuntu20.04.1+deb.sury.org+1

dpkg --remove libnginx-mod-brotli
apt --fix-broken install
apt install libnginx-mod-brotli # completed without errors

Saved my morning from being a nightmare - muchas gracias @hrvoj3e!

willtate commented 1 day ago

@hrvoj3e what a lad!