Closed massej closed 4 months ago
Since you didn't use the bug template (WHY?), you need to go here, check what information I need and fill in the details manually: https://github.com/oerdnj/deb.sury.org/blob/master/.github/ISSUE_TEMPLATE/bug_report.md and add this to this bug.
Also why are you doing: apt-get install libluajit2-5.1-2 libluajit2-5.1-common -y
, you should let the apt solver to pick the luajit library for you.
name: Bug report about: "WARNING: if you don't use the template, the issue will be closed possibly even without a comment WARNING" title: 'Ubuntu 24.04 - cannot install nginx-extra' labels: 'nginx-extra' assignees: ''
Frequently asked questions
Describe the bug I try to install nginx-extra on Ubuntu 24.04 (nobel) but it doesn't work
13.99 Reading state information... 14.53 Some packages could not be installed. This may mean that you have 14.53 requested an impossible situation or if you are using the unstable 14.53 distribution that some required packages have not yet been created 14.53 or been moved out of Incoming. 14.53 The following information may help to resolve the situation: 14.53 14.53 The following packages have unmet dependencies: 15.01 libnginx-mod-http-lua : Depends: libluajit-5.1-2 (>= 2.1-20220411) but it is not installable or 15.01 libluajit-5.1-2 (>= 2.1.0~beta3) but it is not installable 15.02 E: Unable to correct problems, you have held broken packages.
It there a way to install 2.1-20220411 or 2.1.0~beta3 on 24.04?
In the Ubuntu 24.04 it's using libluajit-5.1-2 (2.1.0+git20231223.c525bcb+dfsg-1)
To Reproduce add-apt-repository ppa:ondrej/nginx-mainline -y apt-get install libluajit2-5.1-2 libluajit2-5.1-common -y apt-get update apt-get install nginx-common -y apt-get install nginx-extras -y
Your understanding of what is happening Conflict version (the required version doesnt exist in Ubuntu 24.04)
What steps did you take to resolve issue yourself before reporting it here Downgrade to Ubuntu 22.04 fix the issue
Expected behavior To have nginx-extra installed
Distribution (please complete the following information):
Package(s) (please complete the following information): libluajit-5.1-2: Installed: (none) Candidate: 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 Version table: 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 500 500 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu noble/main amd64 Packages 2.1.0+git20231223.c525bcb+dfsg-1 500 500 http://ca.archive.ubuntu.com/ubuntu noble/universe amd64 Packages Additional context Even if you don't install libluajit2-5.1-2 or libluajit2-5.1-common before it still doesnt work with the same error.
I also tried with the ubuntu 24.04 docker image, same issue is happening
~
Ok, I still miss: apt-cache policy libnginx-mod-http-lua
output?
Ok, I still miss:
apt-cache policy libnginx-mod-http-lua
output?
Don’t paste screenshots of the terminal. Copy and paste text into backticks.
What happens when you try to install the version it actually needs? E.g. apt-get install libluajit-5.1-2
Don’t paste screenshots of the terminal. Copy and paste text into backticks.
What happens when you try to install the version it actually needs? E.g.
apt-get install libluajit-5.1-2
root@UBUNTU:/home/masjon2302# apt-get install libluajit-5.1-2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libluajit-5.1-common
The following NEW packages will be installed:
libluajit-5.1-2 libluajit-5.1-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 328 kB of archives.
After this operation, 845 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 noble/main amd64 libluajit-5.1-common all 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 [49.1 kB]
Get:2 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu noble/main amd64 libluajit-5.1-2 amd64 2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1 [279 kB]
Fetched 328 kB in 1s (378 kB/s)
Selecting previously unselected package libluajit-5.1-common.
(Reading database ... 188789 files and directories currently installed.)
Preparing to unpack .../libluajit-5.1-common_2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1_all.deb ...
Unpacking libluajit-5.1-common (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ...
Selecting previously unselected package libluajit-5.1-2:amd64.
Preparing to unpack .../libluajit-5.1-2_2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libluajit-5.1-2:amd64 (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ...
Setting up libluajit-5.1-common (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ...
Setting up libluajit-5.1-2:amd64 (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) ...
Processing triggers for libc-bin (2.39-0ubuntu8.2) ...
oot@UBUNTU:/home/masjon2302#
And after that it still doesn’t work?
Can you show the output of apt-cache show libnginx-mod-http-lua
?
It still doesnt work (even if libluajit-5.1-2 is installed) : root@UBUNTU:/home/masjon2302# 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-lua : Depends: libluajit-5.1-2 (>= 2.1-20220411) but it is not installable or libluajit-5.1-2 (>= 2.1.0~beta3) but it is not installable E: Unable to correct problems, you have held broken packages.
Here is the output of apt-cache show libnginx-mod-http-lua root@UBUNTU:/home/masjon2302# apt-cache show libnginx-mod-http-lua Package: libnginx-mod-http-lua Source: libnginx-mod-http-lua (1:0.10.26-2+ubuntu24.04.1+deb.sury.org+7) Priority: optional Section: httpd Installed-Size: 460 Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net Architecture: amd64 Version: 1:0.10.26+1.27.0-2+ubuntu24.04.1+deb.sury.org+7 Recommends: nginx Depends: lua-resty-core (<< 0.1.28.1~), lua-resty-core (>= 0.1.28), libnginx-mod-http-ndk, nginx-abi-1.27.0-1, libc6 (>= 2.33), libluajit-5.1-2 (>= 2.1-20220411) | libluajit-5.1-2 (>= 2.1.0~beta3) Filename: pool/main/libn/libnginx-mod-http-lua/libnginx-mod-http-lua_0.10.26+1.27.0-2+ubuntu24.04.1+deb.sury.org+7_amd64.deb Size: 170172 MD5sum: f01f0d07f152298e6f84e16d5b1024c3 SHA1: d2b8ba94407bde5e247afeda17cb9e3959994d7a SHA256: 720fe478dd6f78961fdaad1e63cf3b416373c2ee778008be26a3cad6f8532a9a Description-en: Lua module for Nginx Embed Lua runtime into nginx. . This module embeds Lua, via LuaJIT 2-5.1, into Nginx and by leveraging Nginx's subrequests, allows the integration of the powerful Lua threads (Lua coroutines) into the Nginx event model. Description-md5: 54f5fee9d10603d78e3df169c29b9a06 Multi-Arch: foreign
Package: libnginx-mod-http-lua Architecture: amd64 Version: 1:0.10.26-2 Multi-Arch: foreign Priority: optional Section: universe/httpd Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 456 Depends: lua-resty-core (<< 0.1.28.1~), lua-resty-core (>= 0.1.28), libnginx-mod-http-ndk, nginx-abi-1.24.0-1, libc6 (>= 2.33), libluajit2-5.1-2 (>= 2.1-20220411) | libluajit-5.1-2 (>= 2.1.0~beta3) Recommends: nginx Filename: pool/universe/libn/libnginx-mod-http-lua/libnginx-mod-http-lua_0.10.26-2_amd64.deb Size: 167788 MD5sum: 51550f944fd1d61046bd9082e5cc9c1d SHA1: 40c376477dfeddeeaa6fbbda6a75ebd4e945e894 SHA256: 230b8b57b8865e4c498fd9f5106cba8f2d5bbc4a34fa4212f2c723162471355c SHA512: f4fe14b8fde7cc6d808ffed72fd7ad754eb443ab61823de2d6f31c646c02b63d054ac6e34723357901c9b8ce8fa4536081ed251a6f22bfcd0da109b440a20748 Homepage: https://github.com/openresty/lua-nginx-module Description-en: Lua module for Nginx Embed Lua runtime into nginx. . This module embeds Lua, via LuaJIT 2-5.1, into Nginx and by leveraging Nginx's subrequests, allows the integration of the powerful Lua threads (Lua coroutines) into the Nginx event model. Description-md5: 54f5fee9d10603d78e3df169c29b9a06
Hmm, one idea - can you show me apt-cache show nginx-extra
? There might be some leftover dependency…
(I’m not on computer, so I rely on your outputs…)
root@UBUNTU:/home/masjon2302# apt-cache show nginx-extra N: Can't select versions from package 'nginx-extra' as it is purely virtual N: No packages found root@UBUNTU:/home/masjon2302#
I have the feeling that it sees the newer version in Ubuntu 24.04 : libluajit-5.1-2:amd64 (2.1.0+openresty20240626-1+ubuntu24.04.1+deb.sury.org+1) as a lower version than libluajit-5.1-2 (>= 2.1.0~beta3)
Ubuntu 24.04 doesn't have the older version (beta 3) available in the repo though.
If you check (the beta 3 is not there for Nobel - Ubuntu 24.04) https://packages.ubuntu.com/search?keywords=libluajit-5.1-2
Nope, ~ is lower than + in dpkg version arithmetic.
root@UBUNTU:/home/masjon2302# apt-cache show nginx-extra N: Can't select versions from package 'nginx-extra' as it is purely virtual N: No packages found root@UBUNTU:/home/masjon2302#
This should have been nginx-extras
.
My bad
Here it is with nginx-extras :
root@UBUNTU:/home/masjon2302# apt-cache show nginx-extras
Package: nginx-extras
Source: nginx
Priority: optional
Section: httpd
Installed-Size: 25
Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net
Architecture: amd64
Version: 1.27.0-2+ubuntu24.04.1+deb.sury.org+1
Depends: nginx (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-geoip (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-image-filter (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-perl (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-xslt-filter (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-mail (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-stream (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-stream-geoip (= 1.27.0-2+ubuntu24.04.1+deb.sury.org+1), libnginx-mod-http-auth-pam (>= 1:1.5.5+1.27.0), libnginx-mod-http-cache-purge (>= 1:2.3+1.27.0), libnginx-mod-http-dav-ext (>= 1:3.0.0+1.27.0), libnginx-mod-http-echo (>= 1:0.63+1.27.0), libnginx-mod-http-fancyindex (>= 1:0.5.2+1.27.0), libnginx-mod-http-geoip2 (>= 1:3.4+1.27.0), libnginx-mod-http-headers-more-filter (>= 1:0.34+1.27.0), libnginx-mod-http-lua (>= 1:0.10.26+1.27.0), libnginx-mod-http-subs-filter (>= 1:0.6.4-6+1.27.0), libnginx-mod-http-uploadprogress (>= 1:0.9.2+1.27.0), libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409+1.27.0), libnginx-mod-nchan (>= 1:1.3.6+dfsg+1.27.0~), libnginx-mod-stream-geoip2 (>= 1:3.4+1.27.0)
Filename: pool/main/n/nginx/nginx-extras_1.27.0-2+ubuntu24.04.1+deb.sury.org+1_amd64.deb
Size: 12624
MD5sum: 47d1ccb520fb4e9b51eaac43e964f6d5
SHA1: 8b57312f5e8b53f1ebcc796a25ab2f7a8951371e
SHA256: 5928d24a251ca9068d97d2ce36c5a1a4c42b3241ecb7da50e0b32db39a017cab
Description-en: nginx web/proxy server (extended version)
Nginx ("engine X") is a high-performance web and reverse proxy server
created by Igor Sysoev. It can be used both as a standalone web server
and as a proxy to reduce the load on back-end HTTP or mail servers.
.
This metapackage provides a version of nginx with the standard modules, plus
extra features and modules such as the Perl module, which allows the
addition of Perl in configuration files.
.
STANDARD HTTP MODULES: Core, Access, Auth Basic, Auto Index, Browser, Empty
GIF, FastCGI, Geo, Limit Connections, Limit Requests, Map, Memcached, Proxy,
Referer, Rewrite, SCGI, Split Clients, UWSGI.
.
OPTIONAL HTTP MODULES: Addition, Auth Request, Charset, WebDAV, FLV, GeoIP,
Gunzip, Gzip, Gzip Precompression, Headers, HTTP/2, Image Filter, Index, Log,
MP4, Embedded Perl, Random Index, Real IP, Slice, Secure Link, SSI, SSL,
SSL Preread, Stub Status, Substitution, Thread Pool, Upstream, User ID, XSLT.
.
OPTIONAL MAIL MODULES: Mail Core, Auth HTTP, Proxy, SSL, IMAP, POP3, SMTP.
.
OPTIONAL STREAM MODULES: Stream, GeoIP, GeoIP2
.
THIRD PARTY MODULES: Auth PAM, Cache Purge, DAV Ext, Echo, Fancy Index,
GeoIP2, Headers More, Embedded Lua, HTTP Substitutions, Nchan, Upload Progress,
Upstream Fair Queue.
Description-md5: 1d3b9fb345563354827d5cafdc42a135
Package: nginx-extras Architecture: amd64 Version: 1.24.0-2ubuntu7 Priority: optional Section: universe/httpd Source: nginx Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Debian Nginx Maintainers pkg-nginx-maintainers@alioth-lists.debian.net Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 29 Depends: nginx (= 1.24.0-2ubuntu7), libnginx-mod-http-geoip (= 1.24.0-2ubuntu7), libnginx-mod-http-image-filter (= 1.24.0-2ubuntu7), libnginx-mod-http-perl (= 1.24.0-2ubuntu7), libnginx-mod-http-xslt-filter (= 1.24.0-2ubuntu7), libnginx-mod-mail (= 1.24.0-2ubuntu7), libnginx-mod-stream (= 1.24.0-2ubuntu7), libnginx-mod-stream-geoip (= 1.24.0-2ubuntu7), libnginx-mod-http-auth-pam (>= 1:1.5.3-4~), libnginx-mod-http-cache-purge (>= 1:2.3-5~), libnginx-mod-http-dav-ext (>= 1:3.0.0-4~), libnginx-mod-http-echo (>= 1:0.63-5~), libnginx-mod-http-fancyindex (>= 1:0.5.2-4~), libnginx-mod-http-geoip2 (>= 1:3.4-4~), libnginx-mod-http-headers-more-filter (>= 1:0.34-4~), libnginx-mod-http-subs-filter (>= 1:0.6.4-5~), libnginx-mod-http-uploadprogress (>= 1:0.9.2-4~), libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409-4~), libnginx-mod-nchan (>= 1:1.3.6+dfsg-3~), libnginx-mod-stream-geoip2 (>= 1:3.4-4~) Filename: pool/universe/n/nginx/nginx-extras_1.24.0-2ubuntu7_amd64.deb Size: 4914 MD5sum: 872857f156ae0e1a06075ad083e0a96b SHA1: b8695a58704739112b5bac05f4b225343177232b SHA256: 6ad848d8c9d25a9c9f3c35be28787a6df210c916b3be960a28e3f7da25a1908c SHA512: 18ab5b53fc8b6c9780a8ffa007440da71b5a1caa9165554c6b9a95c3052a8919ec4276569e2a397b889dceea0efef6877b49ddb229fff11852d7704b3614edfb Homepage: https://nginx.org Description-en: nginx web/proxy server (extended version) Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. . This metapackage provides a version of nginx with the standard modules, plus extra features and modules such as the Perl module, which allows the addition of Perl in configuration files. . STANDARD HTTP MODULES: Core, Access, Auth Basic, Auto Index, Browser, Empty GIF, FastCGI, Geo, Limit Connections, Limit Requests, Map, Memcached, Proxy, Referer, Rewrite, SCGI, Split Clients, UWSGI. . OPTIONAL HTTP MODULES: Addition, Auth Request, Charset, WebDAV, FLV, GeoIP, Gunzip, Gzip, Gzip Precompression, Headers, HTTP/2, Image Filter, Index, Log, MP4, Embedded Perl, Random Index, Real IP, Slice, Secure Link, SSI, SSL, SSL Preread, Stub Status, Substitution, Thread Pool, Upstream, User ID, XSLT. . OPTIONAL MAIL MODULES: Mail Core, Auth HTTP, Proxy, SSL, IMAP, POP3, SMTP. . OPTIONAL STREAM MODULES: Stream, GeoIP, GeoIP2 . THIRD PARTY MODULES: Auth PAM, Cache Purge, DAV Ext, Echo, Fancy Index, GeoIP2, Headers More, Embedded Lua, HTTP Substitutions, Nchan, Upload Progress, Upstream Fair Queue. Description-md5: 1d3b9fb345563354827d5cafdc42a135
root@UBUNTU:/home/masjon2302#
Should be fine in about an hour. lua-resty-core
and lua-resty-lrucache
was missing rebuilt packages in the repository. Thanks for the report.
This is still a problem for me. I had to: apt install nginx=1.24.0-2ubuntu7 in order to install nginx-extras. It won't work with 1.26.
sudo apt 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:
nginx-extras : Depends: nginx (= 1.24.0-2ubuntu7) but 1.26.1-2~noble is to be installed
Depends: libnginx-mod-http-geoip (= 1.24.0-2ubuntu7) but it is not going to be installed
Depends: libnginx-mod-http-image-filter (= 1.24.0-2ubuntu7) but it is not going to be installed
Depends: libnginx-mod-http-perl (= 1.24.0-2ubuntu7) but it is not going to be installed
Depends: libnginx-mod-http-xslt-filter (= 1.24.0-2ubuntu7) but it is not going to be installed
Depends: libnginx-mod-mail (= 1.24.0-2ubuntu7) but it is not going to be installed
Depends: libnginx-mod-stream (= 1.24.0-2ubuntu7) but it is not going to be installed
Depends: libnginx-mod-stream-geoip (= 1.24.0-2ubuntu7) but it is not going to be installed
Depends: libnginx-mod-http-auth-pam (>= 1:1.5.3-4~) but it is not going to be installed
Depends: libnginx-mod-http-cache-purge (>= 1:2.3-5~) but it is not going to be installed
Depends: libnginx-mod-http-dav-ext (>= 1:3.0.0-4~) but it is not going to be installed
Depends: libnginx-mod-http-echo (>= 1:0.63-5~) but it is not going to be installed
Depends: libnginx-mod-http-fancyindex (>= 1:0.5.2-4~) but it is not going to be installed
Depends: libnginx-mod-http-geoip2 (>= 1:3.4-4~) but it is not going to be installed
Depends: libnginx-mod-http-headers-more-filter (>= 1:0.34-4~) but it is not going to be installed
Depends: libnginx-mod-http-subs-filter (>= 1:0.6.4-5~) but it is not going to be installed
Depends: libnginx-mod-http-uploadprogress (>= 1:0.9.2-4~) but it is not going to be installed
Depends: libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409-4~) but it is not going to be installed
Depends: libnginx-mod-nchan (>= 1:1.3.6+dfsg-3~) 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.
I eventually figured a way that works, in Docker as well. Was trying to make the more_clear_headers Server;
command work.
I had to load the module inside the nginx.conf file like so:
1. Write Dockerfile with the latest version of nginx that nginx-extras support (source)
FROM nginx:1.21.0
RUN apt-get update
RUN apt-get install nginx-common -y
RUN apt-get install nginx-extras -y
2. Build the image
docker build --no-cache -t nginx-with-extensions .
3. Run container (I'm using docker compose)
docker compose up -d
3. Verify that the modules installed on the on the running container
docker ps #to read the container id
docker exec -it {contianer_id} /bin/bash
now the container shell will open
nginx -V
And I looked for the module between the --add-dynamic-module
params. I found the one I was looking or -> http-headers-more-filter written as --add-dynamic-module=/build/nginx-FlcIR2/nginx-1.14.2/debian/modules/http-headers-more-filter
.
4. Locate where are the modules installed
I also extractex the actual path where the modules are stored from --modules-path=/usr/lib/nginx/modules
5. Load the module in the nginx.conf On the top level of my nginx.conf I pasted the load command.
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
6. Restart the container
To finish it off, I uncommented the more_clear_headers Server;
and then on my machine put docker compose up -d
. I have the nginx.conf file mapped to the nginx container using volumes, so it worked ok.
Hope this helps some other lost souls!
I know we are way passed beyond how long a ticket like this should be opened, but I just wanted a heads-up as it is still an issue on
root@myserver:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
as the following sais:
root@myserver:~# apt 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:
nginx-extras : Depends: nginx (= 1.24.0-2ubuntu7.1) but 1.26.2-1~noble is to be installed
Depends: libnginx-mod-http-geoip (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-image-filter (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-perl (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-xslt-filter (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-mail (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-stream (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-stream-geoip (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-auth-pam (>= 1:1.5.3-4~) but it is not going to be installed
Depends: libnginx-mod-http-cache-purge (>= 1:2.3-5~) but it is not going to be installed
Depends: libnginx-mod-http-dav-ext (>= 1:3.0.0-4~) but it is not going to be installed
Depends: libnginx-mod-http-echo (>= 1:0.63-5~) but it is not going to be installed
Depends: libnginx-mod-http-fancyindex (>= 1:0.5.2-4~) but it is not going to be installed
Depends: libnginx-mod-http-geoip2 (>= 1:3.4-4~) but it is not going to be installed
Depends: libnginx-mod-http-headers-more-filter (>= 1:0.34-4~) but it is not going to be installed
Depends: libnginx-mod-http-subs-filter (>= 1:0.6.4-5~) but it is not going to be installed
Depends: libnginx-mod-http-uploadprogress (>= 1:0.9.2-4~) but it is not going to be installed
Depends: libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409-4~) but it is not going to be installed
Depends: libnginx-mod-nchan (>= 1:1.3.6+dfsg-3~) 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.
The NginX repo file (/etc/apt/sources.list.d/nginx.list) is:
deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/ubuntu noble nginx
The sollution that worked for me was to install Ondrejs PPA PHP repository that contains the required libraries
add-apt-repository ppa:ondrej/php
Can we have some ETA of this issue being resolved?
@bertalanimre can you get me output of apt-cache policy
for all the affected packages?
Even if I've already resovled the issue by installing the PHP repository? And do you mean all the libnginx
modules or the nginx-extras
and nginx-full
packages?
Even if I've already resovled the issue by installing the PHP repository?
Well, it would be better to have this from the "broken" system, but even having this from the current system might help me understand the issue. Tangentially, what exactly did you do to resolve the issue?
And do you mean all the libnginx modules or the nginx-extras and nginx-full packages?
Yes, please.
Here is my timeline of events then. It is a freshly installed Ubuntu 24.04 LTS VPS of mine.
nginx-extras
. This came back with the exact same error message as on many other threads saying Depends: libnginx-mod-mail (= 1.24.0-2ubuntu7.1) but it is not going to be installed
to a number of mods. The exact list is now faded away and cannot find it in my history. Forgive me please. But if it helps even nginx-full
was saying the exact same error message to 2 or 3 module. NginX on its own was installed successfullyUPDATE (forgot the nginx-mainline repository. Sorry, my bad)
Installed Ondreys PHP repository in order to install PHP 8.1 and some PHP modules.
add-apt-repository ppa:ondrej/php
add-apt-repository ppa:ondrej/nginx-mainline
After installing the modules I (for some unknown curiousity) tried apt install nginx-extras
again. This time, it worked.
The PHP parckages ( I don't know if it will help, but I'll try to provide as many information as I can) I've installed were
apt install php8.1 php8.1-fpm php8.1-curl php8.1-dom php8.1-imap php8.1-intl php8.1-mbstring php8.1-mysqli php8.1-pdo php8.1-xml php8.1-xsl
Output for the commands:
root@myserver:~# apt-cache policy nginx-extras
nginx-extras:
Installed: 1.27.1-1+ubuntu24.04.1+deb.sury.org+1
Candidate: 1.27.1-1+ubuntu24.04.1+deb.sury.org+1
Version table:
*** 1.27.1-1+ubuntu24.04.1+deb.sury.org+1 500
500 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu noble/main amd64 Packages
100 /var/lib/dpkg/status
1.24.0-2ubuntu7.1 500
500 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages
1.24.0-2ubuntu7 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
root@myserver:~# apt-cache policy nginx-full
nginx-full:
Installed: (none)
Candidate: 1.27.1-1+ubuntu24.04.1+deb.sury.org+1
Version table:
1.27.1-1+ubuntu24.04.1+deb.sury.org+1 500
500 https://ppa.launchpadcontent.net/ondrej/nginx-mainline/ubuntu noble/main amd64 Packages
1.24.0-2ubuntu7.1 500
500 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages
1.24.0-2ubuntu7 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
root@myserver:~# nginx -V
nginx version: nginx/1.27.1
built with OpenSSL 3.0.13 30 Jan 2024
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/build/nginx-z26Olq/nginx-1.27.1=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/build/nginx-z26Olq/nginx-1.27.1=/usr/src/nginx-1.27.1-1+ubuntu24.04.1+deb.sury.org+1 -fPIC -Wdate-time -D_FORTIFY_SOURCE=3' --with-ld-opt='-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=stderr --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_v3_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-mail_ssl_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-http_geoip_module=dynamic --with-http_image_filter_module=dynamic --with-http_perl_module=dynamic --with-http_xslt_module=dynamic --with-mail=dynamic --with-stream=dynamic --with-stream_geoip_module=dynamic
Now that I see this, I just realized, I've installed NginX from the PHP repository completely I think as 1.27 is available in that repo only and NginXs own repository has only 1.24 available. May I ask how is this a thing that Ondrejs repository has a higher version NginX than NginX itself? It looks a little like in Formula 1, how McLaren Mercedes is beating the Mercedes factory team in the race :smiley:
I really hope it will help you figure out why couldn't the NginX repository install nginx-extras
.
In advance: I am happy to delete the currently installed NginX version and test realtime with you.
I'm now confused, can you elaborate what do you mean by:
I've installed NginX repository
vs this?
I've installed NginX from the PHP repository completely
What were the exact commands (exact repositories)?
Followed instructions from this URL: https://nginx.org/en/linux_packages.html#Ubuntu
I chose the stable nginx packages
Oh I see. I have nothing to do with the https://nginx.org/en/linux_packages.html#Ubuntu packages. And I can see that you've solved this by using my ppa for nginx-mainline packages. That explains it - I got confused by the first message of yours, but there's nothing I can do with nginx's own repositories. I have nothing to do with those.
I am a curious engineer, so I've removed my NginX from the server (purge nginx and nginx-extras) to try and fresh start it. Also removed Ondrejs NginX repository.
root@myserver:~# apt update
Hit:1 http://nginx.org/packages/ubuntu noble InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble InRelease
Hit:7 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:8 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:5 https://downloads.mariadb.com/Tools/ubuntu noble InRelease
Hit:3 https://dlm.mariadb.com/repo/mariadb-server/11.rolling/repo/ubuntu noble InRelease
Hit:9 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Hit:4 https://dlm.mariadb.com/repo/maxscale/latest/apt noble InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@myserver:~# apt-cache policy nginx-extras
nginx-extras:
Installed: (none)
Candidate: 1.24.0-2ubuntu7.1
Version table:
1.24.0-2ubuntu7.1 500
500 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages
1.24.0-2ubuntu7 500
500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
And here is the same error message I was receiving at the beginning:
root@myserveer:~# apt 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:
nginx-extras : Depends: nginx (= 1.24.0-2ubuntu7.1) but 1.26.2-1~noble is to be installed
Depends: libnginx-mod-http-geoip (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-image-filter (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-perl (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-xslt-filter (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-mail (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-stream (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-stream-geoip (= 1.24.0-2ubuntu7.1) but it is not going to be installed
Depends: libnginx-mod-http-auth-pam (>= 1:1.5.3-4~) but it is not going to be installed
Depends: libnginx-mod-http-cache-purge (>= 1:2.3-5~) but it is not going to be installed
Depends: libnginx-mod-http-dav-ext (>= 1:3.0.0-4~) but it is not going to be installed
Depends: libnginx-mod-http-echo (>= 1:0.63-5~) but it is not going to be installed
Depends: libnginx-mod-http-fancyindex (>= 1:0.5.2-4~) but it is not going to be installed
Depends: libnginx-mod-http-geoip2 (>= 1:3.4-4~) but it is not going to be installed
Depends: libnginx-mod-http-headers-more-filter (>= 1:0.34-4~) but it is not going to be installed
Depends: libnginx-mod-http-subs-filter (>= 1:0.6.4-5~) but it is not going to be installed
Depends: libnginx-mod-http-uploadprogress (>= 1:0.9.2-4~) but it is not going to be installed
Depends: libnginx-mod-http-upstream-fair (>= 1:0.0~git20120408.a18b409-4~) but it is not going to be installed
Depends: libnginx-mod-nchan (>= 1:1.3.6+dfsg-3~) 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.
Should I just try without the NginX repository?
Well... that'll teach me.... Removing the NginX repository solved everything :astonished:
root@myserver:~# apt update
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Hit:5 https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble InRelease
Hit:6 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:2 https://downloads.mariadb.com/Tools/ubuntu noble InRelease
Hit:7 https://dlm.mariadb.com/repo/mariadb-server/11.rolling/repo/ubuntu noble InRelease
Hit:8 https://dlm.mariadb.com/repo/maxscale/latest/apt noble InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@myserver:~# apt install nginx-extras
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libluajit-5.1-2 libluajit-5.1-common lua-resty-lrucache
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
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-geoip2 libnginx-mod-http-headers-more-filter
libnginx-mod-http-image-filter 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 libnginx-mod-stream-geoip2 nginx nginx-common
Suggested packages:
fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
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-geoip2 libnginx-mod-http-headers-more-filter
libnginx-mod-http-image-filter 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 libnginx-mod-stream-geoip2 nginx nginx-common nginx-extras
0 upgraded, 22 newly installed, 0 to remove and 3 not upgraded.
Need to get 1213 kB of archives.
After this operation, 3603 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Thank you for replying and prompting me to go deeper. :smile:
TL;DR DELETE every repository, even NginXs repository and try like that.
I try to install nginx-extra on Ubuntu 24.04 (nobel) but it doesn't work
13.99 Reading state information... 14.53 Some packages could not be installed. This may mean that you have 14.53 requested an impossible situation or if you are using the unstable 14.53 distribution that some required packages have not yet been created 14.53 or been moved out of Incoming. 14.53 The following information may help to resolve the situation: 14.53 14.53 The following packages have unmet dependencies: 15.01 libnginx-mod-http-lua : Depends: libluajit-5.1-2 (>= 2.1-20220411) but it is not installable or 15.01 libluajit-5.1-2 (>= 2.1.0~beta3) but it is not installable 15.02 E: Unable to correct problems, you have held broken packages.
It there a way to install 2.1-20220411 or 2.1.0~beta3 on 24.04?
In the Ubuntu 24.04 it's using libluajit-5.1-2 (2.1.0+git20231223.c525bcb+dfsg-1)
Note : I'm using
add-apt-repository ppa:ondrej/nginx-mainline -y apt-get install libluajit2-5.1-2 libluajit2-5.1-common -y apt-get update apt-get install nginx-common -y apt-get install nginx-extras -y