Select Page

Ubuntu 12.04 update nginx to the latest version

Ubuntu 12.04 update nginx to the latest version

Official version of nginx for #Ubuntu Precise is 1.1.19 but the latest available stable version is 1.2.2 (Changes), In this post I will present you how to update to the latest available version.

vi /etc/apt/sources.list

and add depending on your #Ubuntu version either

For Ubuntu 10.04 Lucid:

deb lucid nginx deb-src 
deb  lucid nginx

For Ubuntu 12.04 Precise:

deb precise nginx deb-src precise nginx

Now you can run

apt-get update

When using the public nginx repository for #Ubuntu, you’ll get this error

W: GPG error: lucid Release: The following signatures <br>couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62

First of all this is only warning and you can ignore it, if you know what are you doing and in case you prefer to add public key, used for signing packages and repository, just run:

gpg -a --export 7BD9BF62 |  sudo apt-key add -


wget cat nginx_signing.key | sudo apt-key add -<
apt update
apt install nginx

you may still get this kind of error:

dpkg: error processing /var/cache/apt/archives/nginx_1.2.2-1~precise_amd64.deb (--unpack):  trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx-common 1.1.19-1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing:  /var/cache/apt/archives/nginx_1.2.2-1~precise_amd64.deb

just remove nginx-common and retry

apt-get remove nginx-common 

More at

About The Author

Cédric Walter

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.