1

Until recently I've been using ppa:nginx/development but suddenly I can't install the nginx version from there anymore on 14.04.

https://launchpad.net/~nginx/+archive/ubuntu/development also states:

The following releases of Ubuntu are no longer supported in the PPA due to build dependencies or problems which cannot be resolved due to the age of the release:

  • Trusty (14.04)

What other options do I have to get a more recent version of nginx on 14.04?

I need at least http2 support (I'm running 1.9 and 1.13 on some machines successfully).

1
  • Which 1.9 and 1.13 versions were you looking at? Also once I declare a release unsupported, any time past that I tend to remove the packages that were there to indicate the PPA isn't supported anymore. Is there a reason you can't run 16.04 or newer machines though, which all have the HTTP/2 support in the versions of nginx already in it?
    – Thomas Ward
    Jul 30, 2018 at 15:50

1 Answer 1

4

FYI: I'm the maintainer of that PPA, so this is all knowledge related to why 14.04 isn't supported in the PPA anymore.

Just an FYI, "NGINX Development" is no longer "Development". The Development branch became the "Mainline" branch, so you should refer to it as such - the PPA's nginx/development is because it's an 'old' PPA held over from before they called it Mainline.

I've meant to change it but it hasn't been a huge priority so...


Why doesn't the PPA support Trusty 14.04 anymore?

The required dependencies for newer NGINX don't exist on 14.04, and we build only the Debian packages from Debian, not the Ubuntu specific variants. As such, the builds for 14.04 of NGINX packages fail because one or more bits of code in NGINX do not build in the (now over 4 years old) 14.04 code bases.

The build logs show this failure:

cc -c -fPIC -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC -D_FORTIFY_SOURCE=2 -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/http/modules/perl -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/objs -I objs/addon/ndk -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/src -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/objs -I objs/addon/ndk -I /<<PKGBUILDDIR>>/debian/modules/nchan/src -I /<<PKGBUILDDIR>>/debian/modules/http-lua/src/api -I /usr/include/lua5.1 -I /<<PKGBUILDDIR>>/debian/modules/rtmp -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I /<<PKGBUILDDIR>>/debian/modules/http-ndk/src -I src/mail -I src/stream \
        -o objs/addon/store/store_common.o \
        /<<PKGBUILDDIR>>/debian/modules/nchan/src/store/store_common.c
make[3]: *** No rule to make target `/<<PKGBUILDDIR>>/debian/modules/nchan/src/hiredis/hiredis.c', needed by `objs/addon/hiredis/hiredis.o'.  Stop.

... across all architecture builds in 14.04 for the PPA (build logs for 1.15.0: amd64, arm64, armhf, i386, and ppc64el). The exact build failure lies in a third party module that ships with nginx-extras and is in use by a number of individuals. This build failure is not unique to the Mainline branch of NGINX, either, as the same failure happens in the Stable branch. And this build failure only happens in 14.04.

This module does not build in 14.04 under any circumstances; as such 14.04 builds fail to complete. I could drop this feature from the package for Trusty, but that would make the packages not consistent across releases.

For this reason, I dropped 14.04 as a supported from the NGINX PPAs.


The PPA used to have an older 1.13.x build in it, why doesn't that work anymore?

As for the PPA no longer having 1.13, that's because routinely (usually once a year at about the same time each year sometime in mid to late July) I go through and clean up the PPAs to remove versions of the package for "Not Supported in the PPA" releases.

This is why the PPA no longer works for 14.04, because I went and cleaned up the packages in the PPA.

(We had a similar issue with Precise back in 2014 where I had to kill off Precise builds for the same reason: older libraries wouldn't build the newer NGINX and module requirements)


Alternative to the PPA: Use NGINX Upstream Repositories

This will not contain nginx-extras or any third party modules such as the Lua module - if you need those you are out of luck.

Now, to get updated NGINX in 14.04, you can try to use the instructions to install the NGINX Upstream Repositories, however in order to do this you have to remove all other NGINX packages first, and make sure you aren't using any third party modules such as Lua


"The Real Problem", or, "Why you should actually upgrade to a newer Ubuntu instead of using 14.04 for newer NGINX":

The primary reason you really should be going and upgrading to a newer Ubuntu instead of trying to use 14.04 is that HTTP/2 on 14.04 will not have all the required features necessary for true HTTP/2 support - namely ALPN support from the OpenSSL libraries.

HTTP/2 needs ALPN support to truly function in the modern age; this is not available from OpenSSL libraries in Ubuntu 14.04. The other mode for HTTP/2 (NPN) is not supported by many browsers, so you won't actually get HTTP/2 support from many libraries now, as many browsers and such do not support NPN HTTP/2.

The only approach which fixes this is upgrade your systems to at least 16.04, as those will provide new enough OpenSSL to enable HTTP/2 support and also will provide you the ability to use newer builds of NGINX as the libraries are newer and the build dependencies to compile newer NGINX and the packages from Debian exist.

6
  • > however in order to do this you have to remove all other NGINX packages first, and make sure you aren't using any third party module bits. I guess I've been bitten by this now. I followed your guide and installed via upstream and got 1.15.2 but it's not nginx-extras, only nginx and I need LUA supports (I now get: unknown directive "lua_package_path"). 16.04 or newer simply didn't happen for a lot an no reason in particular. For now I'm trying to clear the fire for developers whose local dev broke.
    – mark
    Jul 30, 2018 at 21:27
  • 1
    You didn't state your requirements :P LUA is a third party module. If you require that you are out of luck. (I explicitly state 'make sure you aren't using any third party modules'l
    – Thomas Ward
    Jul 30, 2018 at 21:28
  • Yeah I didn't realize until I progressed further with testing the upsource package 🤷‍♀️
    – mark
    Jul 30, 2018 at 21:51
  • Many thanks, that's all I needed to know and much more 👍
    – mark
    Jul 31, 2018 at 15:03
  • @Mark the other option is compile NGINX with the Lua module yourself, but that may or may not work. I strongly suggest using 16.04 though (so upgrade to 16.04) because in less than a year Trusty will go End of LIfe and then it is officially not supported anymore - on this site, in the repos, and in the PPA.
    – Thomas Ward
    Jul 31, 2018 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .