We run Ubuntu 20.04, which has nginx 1.18. I was asked to upgrade it
to 1.25.3, which I did following the instructions here:
https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.
We had 6 modules installed (http-ndk, http-image-filter, http-lua,
http-xslt-filter, mail, stream) which all got removed in the upgrade.
When I try to reinstall them it fails with libnginx-mod-http-ndk :
Depends: nginx-common (= 1.18.0-0ubuntu1.4) but it is not going to be
installed. How can I install the modules I need for 1.25.3? Do I have
to build them from source now?
Hi Larry,
On Thu, Feb 01, 2024 at 11:34:08AM -0500, Larry Martell wrote:
> We run Ubuntu 20.04, which has nginx 1.18. I was asked to upgrade it
> to 1.25.3, which I did following the instructions here:
> https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.
> We had 6 modules installed (http-ndk, http-image-filter, http-lua,
> http-xslt-filter, mail, stream) which all got removed in the upgrade.
> When I try to reinstall them it fails with libnginx-mod-http-ndk :
> Depends: nginx-common (= 1.18.0-0ubuntu1.4) but it is not going to be
> installed. How can I install the modules I need for 1.25.3? Do I have
> to build them from source now?
There two types of modules in the list:
- native, developed by nginx development team;
- third-party, from vendors.
So, http-ndk, [1] and http-lua, [2] are third-party modules. Those
modules need to be recompiled with a corresponding version of nginx.
I'd recommend to visit reference pages to get details how to build
those third-party modules.
References
----------
1. https://github.com/vision5/ngx_devel_kit
2. https://github.com/openresty/lua-nginx-module
--
Sergey A. Osokin
On Thu, Feb 1, 2024 at 11:57 AM Sergey A. Osokin <osa at freebsd.org.ru> wrote:
>
> Hi Larry,
>
> On Thu, Feb 01, 2024 at 11:34:08AM -0500, Larry Martell wrote:
> > We run Ubuntu 20.04, which has nginx 1.18. I was asked to upgrade it
> > to 1.25.3, which I did following the instructions here:
> > https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.
> > We had 6 modules installed (http-ndk, http-image-filter, http-lua,
> > http-xslt-filter, mail, stream) which all got removed in the upgrade.
> > When I try to reinstall them it fails with libnginx-mod-http-ndk :
> > Depends: nginx-common (= 1.18.0-0ubuntu1.4) but it is not going to be
> > installed. How can I install the modules I need for 1.25.3? Do I have
> > to build them from source now?
>
> There two types of modules in the list:
> - native, developed by nginx development team;
> - third-party, from vendors.
>
> So, http-ndk, [1] and http-lua, [2] are third-party modules. Those
> modules need to be recompiled with a corresponding version of nginx.
> I'd recommend to visit reference pages to get details how to build
> those third-party modules.
>
> References
> ----------
> 1. https://github.com/vision5/ngx_devel_kit
> 2. https://github.com/openresty/lua-nginx-module
Hi Sergey,
I was able to install nginx-module-image-filter with apt, but
http-xslt-filter, mail, stream all fail with the same message Depends:
nginx-common (= 1.18.0-0ubuntu1.4).
I looked at the 2 links you gave and both talk about building nginx
from source to get those modules included. Is that now required? With
1.18 I simply did:
sudo apt install lua5.3
sudo apt install libluajit-5.1-2
sudo apt install lua-sql-mysql
sudo apt install libnginx-mod-http-lua
Thanks!
Larry
Hi Larry,
On Thu, Feb 01, 2024 at 12:28:40PM -0500, Larry Martell wrote:
>
> I was able to install nginx-module-image-filter with apt, but
> http-xslt-filter, mail, stream all fail with the same message Depends:
> nginx-common (= 1.18.0-0ubuntu1.4).
>
> I looked at the 2 links you gave and both talk about building nginx
> from source to get those modules included. Is that now required? With
> 1.18 I simply did:
>
> sudo apt install lua5.3
> sudo apt install libluajit-5.1-2
> sudo apt install lua-sql-mysql
> sudo apt install libnginx-mod-http-lua
I've forgotten to mention that you'd need to rebuild all native
modules or use packages from the official site,
https://nginx.org/en/linux_packages.html#Ubuntu
And please do not mix packages from official site and Ubuntu
packages, please choose only one source of true.
Hope that helps.
--
Sergey A. Osokin
On Thu, Feb 1, 2024 at 12:48 PM Sergey A. Osokin <osa at freebsd.org.ru> wrote:
>
> Hi Larry,
>
> On Thu, Feb 01, 2024 at 12:28:40PM -0500, Larry Martell wrote:
> >
> > I was able to install nginx-module-image-filter with apt, but
> > http-xslt-filter, mail, stream all fail with the same message Depends:
> > nginx-common (= 1.18.0-0ubuntu1.4).
> >
> > I looked at the 2 links you gave and both talk about building nginx
> > from source to get those modules included. Is that now required? With
> > 1.18 I simply did:
> >
> > sudo apt install lua5.3
> > sudo apt install libluajit-5.1-2
> > sudo apt install lua-sql-mysql
> > sudo apt install libnginx-mod-http-lua
>
> I've forgotten to mention that you'd need to rebuild all native
> modules or use packages from the official site,
> https://nginx.org/en/linux_packages.html#Ubuntu
>
> And please do not mix packages from official site and Ubuntu
> packages, please choose only one source of true.
I had already done all that. (Those instructors are the same as the
page I initially referenced,
https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.)
But it still seems to be using Ubuntu packages:
$ sudo apt policy libnginx-mod-mail
libnginx-mod-mail:
Installed: (none)
Candidate: 1.18.0-0ubuntu1.4
Version table:
1.18.0-0ubuntu1.4 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main
amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
100 /var/lib/dpkg/status
1.17.10-0ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
On Thu, Feb 01, 2024 at 01:10:35PM -0500, Larry Martell wrote:
>
> I had already done all that. (Those instructors are the same as the
> page I initially referenced,
> https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.)
> But it still seems to be using Ubuntu packages:
>
> $ sudo apt policy libnginx-mod-mail
> libnginx-mod-mail:
> Installed: (none)
> Candidate: 1.18.0-0ubuntu1.4
> Version table:
> 1.18.0-0ubuntu1.4 500
> 500 http://us.archive.ubuntu.com/ubuntu focal-updates/main
> amd64 Packages
> 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
> 100 /var/lib/dpkg/status
> 1.17.10-0ubuntu1 500
> 500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
The nginx prebuilt packages for Ubuntu has built with the mail module,
so you do not need to install it as a separate package. Ubuntu' nginx
packages can be safely removed.
To see how nginx has been built run the following command:
% nginx -V
--
Sergey A. Osokin
On Thu, Feb 1, 2024 at 1:28 PM Sergey A. Osokin <osa at freebsd.org.ru> wrote:
>
> On Thu, Feb 01, 2024 at 01:10:35PM -0500, Larry Martell wrote:
> >
> > I had already done all that. (Those instructors are the same as the
> > page I initially referenced,
> > https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.)
> > But it still seems to be using Ubuntu packages:
> >
> > $ sudo apt policy libnginx-mod-mail
> > libnginx-mod-mail:
> > Installed: (none)
> > Candidate: 1.18.0-0ubuntu1.4
> > Version table:
> > 1.18.0-0ubuntu1.4 500
> > 500 http://us.archive.ubuntu.com/ubuntu focal-updates/main
> > amd64 Packages
> > 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
> > 100 /var/lib/dpkg/status
> > 1.17.10-0ubuntu1 500
> > 500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
>
> The nginx prebuilt packages for Ubuntu has built with the mail module,
> so you do not need to install it as a separate package. Ubuntu' nginx
> packages can be safely removed.
>
> To see how nginx has been built run the following command:
>
> % nginx -V
$ sudo nginx -V > /tmp/nginx.V
nginx version: nginx/1.25.3
built by gcc 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
built with OpenSSL 1.1.1f 31 Mar 2020
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx
--modules-path=/usr/lib/nginx/modules
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock
--http-client-body-temp-path=/var/cache/nginx/client_temp
--http-proxy-temp-path=/var/cache/nginx/proxy_temp
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
--http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx
--group=nginx --with-compat --with-file-aio --with-threads
--with-http_addition_module --with-http_auth_request_module
--with-http_dav_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_realip_module --with-http_secure_link_module
--with-http_slice_module --with-http_ssl_module
--with-http_stub_status_module --with-http_sub_module
--with-http_v2_module --with-http_v3_module --with-mail
--with-mail_ssl_module --with-stream --with-stream_realip_module
--with-stream_ssl_module --with-stream_ssl_preread_module
--with-cc-opt='-g -O2
-fdebug-prefix-map=/data/builder/debuild/nginx-1.25.3/debian/debuild-base/nginx-1.25.3=.
-fstack-protector-strong -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions
-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
So I see mail and stream there, but not http-xslt-filter. That also
gives the same error:
libnginx-mod-http-xslt-filter : Depends: nginx-common (=
1.18.0-0ubuntu1.4) but it is not going to be installed
$ sudo apt policy libnginx-mod-http-xslt-filter
libnginx-mod-http-xslt-filter:
Installed: (none)
Candidate: 1.18.0-0ubuntu1.4
Version table:
1.18.0-0ubuntu1.4 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main
amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
100 /var/lib/dpkg/status
1.17.10-0ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
Also concerning the third party packages, how do I get those into
nginx? is a build from source required?
On Thu, Feb 01, 2024 at 01:41:16PM -0500, Larry Martell wrote:
>
> $ sudo nginx -V > /tmp/nginx.V
[...]
> So I see mail and stream there, but not http-xslt-filter. That also
> gives the same error:
According to https://nginx.org/en/docs/http/ngx_http_xslt_module.html,
this module is not built by default, it should be enabled with the
--with-http_xslt_module configuration parameter.
Please note: that module depends on libxml2/libxslt libraries.
[...]
> Also concerning the third party packages, how do I get those into
> nginx? is a build from source required?
Yes, that's requirement to rebuild third-party modules from
their source code.
--
Sergey A. Osokin
Hello,
On Thu, 1 Feb 2024 12:28:40 -0500
Larry Martell <larry.martell at gmail.com> wrote:
> On Thu, Feb 1, 2024 at 11:57 AM Sergey A. Osokin <osa at freebsd.org.ru> wrote:
> >
> > Hi Larry,
> >
> > On Thu, Feb 01, 2024 at 11:34:08AM -0500, Larry Martell wrote:
> > > We run Ubuntu 20.04, which has nginx 1.18. I was asked to upgrade it
> > > to 1.25.3, which I did following the instructions here:
> > > https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.
> > > We had 6 modules installed (http-ndk, http-image-filter, http-lua,
> > > http-xslt-filter, mail, stream) which all got removed in the upgrade.
> > > When I try to reinstall them it fails with libnginx-mod-http-ndk :
> > > Depends: nginx-common (= 1.18.0-0ubuntu1.4) but it is not going to be
> > > installed. How can I install the modules I need for 1.25.3? Do I have
> > > to build them from source now?
> >
> > There two types of modules in the list:
> > - native, developed by nginx development team;
> > - third-party, from vendors.
> >
> > So, http-ndk, [1] and http-lua, [2] are third-party modules. Those
> > modules need to be recompiled with a corresponding version of nginx.
> > I'd recommend to visit reference pages to get details how to build
> > those third-party modules.
> >
> > References
> > ----------
> > 1. https://github.com/vision5/ngx_devel_kit
> > 2. https://github.com/openresty/lua-nginx-module
>
> Hi Sergey,
>
> I was able to install nginx-module-image-filter with apt, but
> http-xslt-filter, mail, stream all fail with the same message Depends:
> nginx-common (= 1.18.0-0ubuntu1.4).
>
> I looked at the 2 links you gave and both talk about building nginx
> from source to get those modules included. Is that now required? With
> 1.18 I simply did:
>
It's nothing to do with version. What you've done is switch from Ubuntu
provided packages to nginx.org provided packages. Ubuntu provides third
party binary modules that are not in the offical repo.
The list of offical packges in the repo can be quickly seen by
browsing:
https://nginx.org/packages/mainline/ubuntu/pool/nginx/n/
> sudo apt install lua5.3
> sudo apt install libluajit-5.1-2
> sudo apt install lua-sql-mysql
> sudo apt install libnginx-mod-http-lua
>
> Thanks!
> Larry
For Lua (and Luajit) you can build from source using make files from
the nginx offical packaging mercurial repo:
https://hg.nginx.org/pkg-oss/file/1c4041361462/contrib/src
https://hg.nginx.org/pkg-oss/file/1c4041361462/build_module.sh
(1.25.3 commit)
There are many other useful modules there too that are not shipped as
binaries.
However, I don't believe lua-sql-mysql is included there, so you will
still need to build that from sources on github:
https://github.com/openresty/lua-resty-mysql
On Thu, Feb 1, 2024 at 2:03 PM J Carter <jordanc.carter at outlook.com> wrote:
>
> Hello,
>
> On Thu, 1 Feb 2024 12:28:40 -0500
> Larry Martell <larry.martell at gmail.com> wrote:
>
> > On Thu, Feb 1, 2024 at 11:57 AM Sergey A. Osokin <osa at freebsd.org.ru> wrote:
> > >
> > > Hi Larry,
> > >
> > > On Thu, Feb 01, 2024 at 11:34:08AM -0500, Larry Martell wrote:
> > > > We run Ubuntu 20.04, which has nginx 1.18. I was asked to upgrade it
> > > > to 1.25.3, which I did following the instructions here:
> > > > https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/.
> > > > We had 6 modules installed (http-ndk, http-image-filter, http-lua,
> > > > http-xslt-filter, mail, stream) which all got removed in the upgrade.
> > > > When I try to reinstall them it fails with libnginx-mod-http-ndk :
> > > > Depends: nginx-common (= 1.18.0-0ubuntu1.4) but it is not going to be
> > > > installed. How can I install the modules I need for 1.25.3? Do I have
> > > > to build them from source now?
> > >
> > > There two types of modules in the list:
> > > - native, developed by nginx development team;
> > > - third-party, from vendors.
> > >
> > > So, http-ndk, [1] and http-lua, [2] are third-party modules. Those
> > > modules need to be recompiled with a corresponding version of nginx.
> > > I'd recommend to visit reference pages to get details how to build
> > > those third-party modules.
> > >
> > > References
> > > ----------
> > > 1. https://github.com/vision5/ngx_devel_kit
> > > 2. https://github.com/openresty/lua-nginx-module
> >
> > Hi Sergey,
> >
> > I was able to install nginx-module-image-filter with apt, but
> > http-xslt-filter, mail, stream all fail with the same message Depends:
> > nginx-common (= 1.18.0-0ubuntu1.4).
> >
> > I looked at the 2 links you gave and both talk about building nginx
> > from source to get those modules included. Is that now required? With
> > 1.18 I simply did:
> >
>
> It's nothing to do with version. What you've done is switch from Ubuntu
> provided packages to nginx.org provided packages. Ubuntu provides third
> party binary modules that are not in the offical repo.
>
> The list of offical packges in the repo can be quickly seen by
> browsing:
> https://nginx.org/packages/mainline/ubuntu/pool/nginx/n/
>
> > sudo apt install lua5.3
> > sudo apt install libluajit-5.1-2
> > sudo apt install lua-sql-mysql
> > sudo apt install libnginx-mod-http-lua
> >
> > Thanks!
> > Larry
>
> For Lua (and Luajit) you can build from source using make files from
> the nginx offical packaging mercurial repo:
>
> https://hg.nginx.org/pkg-oss/file/1c4041361462/contrib/src
> https://hg.nginx.org/pkg-oss/file/1c4041361462/build_module.sh
> (1.25.3 commit)
>
> There are many other useful modules there too that are not shipped as
> binaries.
>
> However, I don't believe lua-sql-mysql is included there, so you will
> still need to build that from sources on github:
>
> https://github.com/openresty/lua-resty-mysql
Thanks to all for the replies. The reason we wanted to upgrade to 1.25
was because of the vulnerabilities identified in 1.18. But for now we
decided to patch 1.18 to mitigate them. We may end up not needing lua
or maybe the 1.25 versions will make it into the Ubuntu repos.