oerdnj / deb.sury.org

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

libnginx-mod-http-geoip2 conflicts during installation #2117

Closed TuningYourCode closed 2 months ago

TuningYourCode commented 2 months ago

Frequently asked questions

Describe the bug We run use the nginx-mainline repo and have unattenden_upgrades running which failed today night. The error is after i removed the nginx packages:

INT 08:54:24 [root@host ~]# apt install libnginx-mod-http-geoip2
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+0~20240416.51+debian11~1.gbp042f86 is to be installed
E: Unable to correct problems, you have held broken packages.
INT 08:54:45 [root@host ~]# apt-mark showhold
INT 08:55:02 [root@host ~]# dpkg -l | grep "^hi"

To Reproduce Steps to reproduce the behavior:

  1. Setup https://packages.sury.org/nginx-mainline/ on Debian Bullseye
  2. apt install libnginx-mod-http-geoip2

Your understanding of what is happening i guess the dependency in the libnginx-mod-http-geoip2 is wrongly set to require libnginx-mod-stream < 1.25.4.1~

What steps did you take to resolve issue yourself before reporting it here Describe how did you try to resolve the issue yourself. This is closely connected to the previous question.

Expected behavior that apt install libnginx-mod-http-geoip2 works without dependency problem.

Distribution (please complete the following information):

Package(s) (please complete the following information): (we use nexus repository manager to cache the repository - we also purged it already to retrieve latest version just in case we cached broken state)

INT 08:59:45 [root@host ~]# apt-cache policy libnginx-mod-http-geoip2
libnginx-mod-http-geoip2:
  Installed: (none)
  Candidate: 1:3.4+1.25.4-5+0~20240226.1+debian11~1.gbpf3955f
  Version table:
     1:3.4+1.25.4-5+0~20240226.1+debian11~1.gbpf3955f 500
        500 https://repo.xxx/repository/apt-sury-nginx-mainline bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
     1.18.0-6.1+deb11u3 500
        500 https://repo.xxx/repository/apt-debian-updates bullseye-security/main amd64 Packages
        500 https://repo.xxx/repository/apt-debian bullseye/main amd64 Packages
INT 09:01:39 [root@host ~]# apt-cache policy libnginx-mod-stream
libnginx-mod-stream:
  Installed: (none)
  Candidate: 1.25.5-1+0~20240416.51+debian11~1.gbp042f86
  Version table:
     1.25.5-1+0~20240416.51+debian11~1.gbp042f86 500
        500 https://repo.xxx/repository/apt-sury-nginx-mainline bullseye/main amd64 Packages
        100 /var/lib/dpkg/status
     1.18.0-6.1+deb11u3 500
        500 https://repo.xxx/repository/apt-debian-updates bullseye-security/main amd64 Packages
        500 https://repo.xxx/repository/apt-debian bullseye/main amd64 Packages
NielsH commented 2 months ago

We encountered the same issue on Debian 12. After running unattended-upgrades, we now get the following error:

nginx -t
2024/04/17 09:22:49 [emerg] 458847#458847: module "/usr/share/nginx/modules/ngx_http_lua_module.so" version 1025005 instead of 1025004 in /etc/nginx/modules-enabled/50-mod-http-lua.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

Running unattended-upgrades again in dry-run mode gives this output:

Checking: libnginx-mod-http-geoip ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting libnginx-mod-http-geoip's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: libnginx-mod-http-image-filter ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting libnginx-mod-http-image-filter's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: libnginx-mod-http-perl ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting libnginx-mod-http-perl's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: libnginx-mod-http-xslt-filter ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting libnginx-mod-http-xslt-filter's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: libnginx-mod-mail ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting libnginx-mod-mail's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: libnginx-mod-stream ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting libnginx-mod-stream's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: libnginx-mod-stream-geoip ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting libnginx-mod-stream-geoip's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: nginx ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting nginx's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: nginx-common ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
falling back to adjusting nginx-common's dependencies
sanity check failed for: {'nginx=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-perl=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-extras=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-mail=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-stream-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-http-xslt-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'nginx-common=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-geoip2=1:3.4+1.25.4-5+0~20240226.1+debian12~1.gbpf3955f', 'libnginx-mod-stream-geoip=1.25.5-1+0~20240416.51+debian12~1.gbp042f86', 'libnginx-mod-http-image-filter=1.25.5-1+0~20240416.51+debian12~1.gbp042f86'} : pkg libnginx-mod-stream-geoip2 is marked to be deleted
Checking: nginx-extras ([<Origin component:'main' archive:'bookworm' origin:'deb.sury.org' label:'' site:'packages.sury.org' isTrusted:True>])
package nginx-extras upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
falling back to adjusting nginx-extras's dependencies
package nginx-extras upgradable but fails to be marked for upgrade (E:Unable to correct problems, you have held broken packages.)
sanity check failed for: set() : no package is selected to be upgraded or installed
pkgs that look like they should be upgraded:
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
Packages blacklist due to conffile prompts: []
No packages found that can be upgraded unattended and no pending auto-removals
The list of kept packages can't be calculated in dry-run mode.

Running an apt upgrade -s shows held-back packges:

The following packages have been kept back:
  libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-perl libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip nginx nginx-common nginx-extras

Trying to manually install those gives:

apt install libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-perl libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip nginx nginx-common nginx-extras -s
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-extras : Depends: libnginx-mod-http-geoip2 (>= 1:3.4-4~) but it is not going to be installed
                Depends: libnginx-mod-stream-geoip2 (>= 1:3.4-4~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

When we do a dist-upgrade it seems like it may work, but it will also remove a bunch of other packages so i'm afraid it will also break some things:

 apt dist-upgrade -s
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:
  geoip-database libgeoip1 libluajit-5.1-2 libluajit-5.1-common libnginx-mod-http-auth-pam libnginx-mod-http-cache-purge libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-fancyindex libnginx-mod-http-geoip libnginx-mod-http-headers-more-filter libnginx-mod-http-image-filter libnginx-mod-http-lua libnginx-mod-http-ndk libnginx-mod-http-perl
  libnginx-mod-http-subs-filter libnginx-mod-http-uploadprogress libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-nchan libnginx-mod-stream libnginx-mod-stream-geoip lua-resty-core lua-resty-lrucache
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  libnginx-mod-http-geoip2 libnginx-mod-stream-geoip2 nginx-extras
The following NEW packages will be installed:
  linux-image-6.1.0-20-amd64
The following packages will be upgraded:
  containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-perl libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libnginx-mod-stream-geoip linux-image-amd64 linux-libc-dev nginx nginx-common
kevin-olbrich commented 2 months ago

I also had the same problem. In case nginx is already in failed state, this can help getting it back running (only if the core features are used):

systemctl disable nginx
systemctl stop nginx
apt install -f
mkdir /root/old-enabled-modules/
mv /etc/nginx/modules-enabled/* /root/old-enabled-modules/
systemctl enable nginx
systemctl restart nginx

The "systemctl disable" is important to be able to install the updates. APT will then not try to restart the service during the installation, which does not work in this state anyway and then causes the update to abort with an error.

djrm05 commented 2 months ago

Same error trying to upgrade nginx, resulting in the 2nd upgrade that broke nginx. is there anyway to install a previous package version?

The following packages have unmet dependencies:
 libnginx-mod-http-geoip2 : Depends: libnginx-mod-stream (< 1.25.4.1~) but 1.25.5-1+0~20240416.51+debian11~1.gbp042f86 is to be installed
E: Unable to correct problems, you have held broken packages.
brendan-pike commented 2 months ago

Same error trying to upgrade nginx, resulting in the 2nd upgrade that broke nginx. is there anyway to install a previous package version?

This update has broken several of my servers also, it seems many modules are not updated, eg.

2024/04/18 15:06:19 [emerg] 21159#21159: 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
nginx: configuration file /etc/nginx/nginx.conf test failed
root@Hyssop:/etc/nginx/modules-enabled# ls -l /usr/share/nginx/modules-available/mod-http-dav-ext.conf

@kevin-olbrich suggested workaround does work but not if there are required modules not upgraded.

TuningYourCode commented 2 months ago

Today i got the following error on our test systems:

Apr 18 09:11:48 xxx systemd[1]: Starting A high performance web server and a reverse proxy server...
Apr 18 09:11:48 xxx nginx[534182]: 2024/04/18 09:11:48 [emerg] 534182#534182: 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 18 09:11:48 xxx nginx[534182]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 18 09:11:48 xxx systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Apr 18 09:11:48 xxx systemd[1]: nginx.service: Failed with result 'exit-code'.
Apr 18 09:11:48 xxx systemd[1]: Failed to start A high performance web server and a reverse proxy server.

I switched from https://packages.sury.org/nginx-mainline to https://packages.sury.org/nginx in our nexus repository manger instance for the nginx apt repository and it seems to work again. It might be an older version but most likely good enough for most people or a kind of workaround for people which don't have some kind of cache or access to the old package versions.

oerdnj commented 2 months ago

Now tracked in a single issue, see https://github.com/oerdnj/deb.sury.org/issues/2118#issuecomment-2063660953 for the final culprit.