2

Installing NGINX version 1.22 on Ubuntu Focal 20.04 give me this error

The following packages have unmet dependencies: libnginx-mod-http-lua : Depends: libnginx-mod-http-ndk (= 1.18.0-0ubuntu1.3) but it is not going to be installed Depends: nginx-common (= 1.18.0-0ubuntu1.3) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Is there any work on this being allocated and when can this problem be solved?

ronald
  • 29
  • 1
  • 5
  • 1
    Did you upgrade to 20.04 from an older release? That'sthe only way you would have stale apt information about Lua modules, which are nonexistent in 20.04 and later by the decision of the Ubuntu Server Team – Thomas Ward Aug 09 '22 at 16:07

1 Answers1

4

Since Ubuntu 20.04, the Ubuntu Server Team made a decision to drop the Lua module due to several factors including:

  1. Outdated Lua library support
  2. No liblua-dev suport in later versions of the Lua module
  3. Additional modules were required for future updates of the Lua module.

As such, NGINX in the Ubuntu repositories does not have Lua support and will not have Lua support going forward.

If you intend to use Lua with NGINX in Ubuntu, you need to install the complete OpenResty stack of NGINX - see https://openresty.org/en/linux-packages.html#ubuntu for installation instructions. Note that the Lua module actually originated from the OpenResty 'flavor' of nginx.


Note that additionally in later flavors of Ubuntu, the Lua module may become available as a standalone package NOT part of the nginx source package, however the Lua module does not properly support ppc64el and PowerPC architecture installations of Ubuntu, due to issues with the underlying LuaJIT requirements not working properly on those architectures (and with it removed from Debian now for those architectures).

Thomas Ward
  • 74,764
  • The real answer is NOT to use the openresty full installation but to recompile NGINX with all options including lua support. I have done this for NGINX 1.22 with a good result. – ronald Nov 11 '22 at 09:46