Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
TuningYourCode opened this issue Apr 17, 2024 · 6 comments
Closed
3 tasks done

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

TuningYourCode opened this issue Apr 17, 2024 · 6 comments

Comments

@TuningYourCode
Copy link

TuningYourCode commented Apr 17, 2024

Frequently asked questions

  • I have read Frequently Asked Questions
  • I have looked at the list of the existing issues (including closed issues) and searched if my issue has been already reported
  • I have tried to resolve the issue myself and will describe what I did in clear and consise manner

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):

  • OS: Debian
  • Architecture: amd64
  • Repository: packages.sury.org

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
@TuningYourCode TuningYourCode changed the title libnginx-mod-http-geoip2 conflicts libnginx-mod-http-geoip2 conflicts during installation Apr 17, 2024
@NielsH
Copy link

NielsH commented Apr 17, 2024

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

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

djrm05 commented Apr 17, 2024

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

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

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

oerdnj commented Apr 18, 2024

Now tracked in a single issue, see #2118 (comment) for the final culprit.

@oerdnj oerdnj closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants