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 http://nginx.org/packages/ubuntu/ lucid nginx
deb-src http://nginx.org/packages/ubuntu/ lucid nginx

For Ubuntu 12.04 Precise:

deb http://nginx.org/packages/ubuntu/ precise nginx
deb-src http://nginx.org/packages/ubuntu/ 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: http://nginx.org lucid Release: The following signatures 
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 -

or

wget http://nginx.org/packages/keys/nginx_signing.key
cat nginx_signing.key | sudo apt-key add -

apt-get update should now run fine, however after running an

apt-get 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 http://wiki.nginx.org/Install

comments powered by Disqus

You might like also

How to Mount and Use an exFAT Drive on Linux
Try connecting an exFAT-formatted drive without installing the required software and you’ll often see “Unable to mount” error message saying “unknown file system type: ‘exfat’.” Even (still) with the latest Linux Ubuntu 17.10, the same cryptic error is displayed. Searching in Ubuntu Software for exFat return nothing. Damn! normal users are lost and go back to Windows / MacOS. My next move was to google for a response, which I found of course: sudo apt-get install exfat-fuse exfat-utils If Linux want to get more desktop …
482 Days ago
Running an Ethereum Node with Docker
Docker is a powerful tool for managing containers and run-time environments and, besides its many advantages, Docker can also be handy to keep your server tidy and secure. Docker allows to run operating systems, applications and tools in so called Containers. A Container is an isolated environments that represents a autonomous host on its own – a bit in the same way a Virtual Machine does. Yet, Docker Containers are much lighter. They do not start an entire full-blown operating system …
733 Days ago
A cheap GPS for your Raspberry PI
Old i-gotu (i-gotU) gt-200e/gt-120 gps receiver work with the raspberry pi just fine! breathing a new life in this 5 years old device. You'll find a lot on eBay cheap for sale i-gotU is a GPS Logger and Receiver 2-in-1 device including user-friendly Travel Blog Software. i-gotU records trip routes, Auto-adds photo GPS locations, creates an animated trip journal that brings back live trip memory by plotting the route and playing back the photos / YouTube videos with the exact location on …
733 Days ago
Java Networking and Proxies with HTTPS
In today's networking environments, particularly corporate ones, application developers have to deal with proxies almost as often as system administrators. In some cases the application should use the system default settings, in other cases it will we want to have a very tight control over what goes through which proxy, and, somewhere in the middle, most applications will be happy to delegate the decision to their users by providing them with a GUI to set the proxy settings, as is …
733 Days ago
How to live patch Ubuntu Linux Kernel without rebooting the server
Kernel live patching enables runtime correction of critical security issues in running kernel without rebooting. How do I enable or patch my Ubuntu Linux 16.04 LTS server without rebooting the box?Ubuntu Linux version 16.04 LTS supports live patching for both enterprise and the Ubuntu community members. The Canonical Livepatch Service is an authenticated, encrypted, signed stream of livepatch kernel modules for Ubuntu servers, virtual machines and desktops. On 20th October, 2016 Canonical officially announced the support for no reboot kernel …
733 Days ago
OpenHAB on rapsberry PI 3 using Z-Wave and Fibaro Sensor
WORK IN PROGRESS, only some notes for now Hardware    Rapsberry PI 3 with Linux openHABianPi 4.4.0-1-rpi2 1 SMP Debian 4.4.6-1+rpi14 (2016-05-05) armv7l GNU/Linux OpenHAB 2.0.0-1 (Release Build) on /dev/ttyACM0 Latest Aeotec Gen5 USB Aeotec’s Z-Stick packs all the tools you need to create and manage a Z-Wave network all within one USB stick. Use the Z-Stick to create your Z-Wave network, use it to add up to 232 Z-Wave devices, and then use it to control them. Fibaro FGMS001-001 …
740 Days ago
Ambient Noise for Ubuntu 16.10 yakkety
Ambient Noise (http://anoise.tuxfamily.org) Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.   In previous Ubuntu version, just open a shell and run sudo add-apt-repository ppa:costales/anoise sudo apt-get update sudo apt-get install anoise Fixing Ambient Noise for Ubuntu 16.10 require for now to compile from source the application. Run these commands into a shell, first installing dependencies: sudo apt-get install bzr gir1.2-gstreamer-1.0 python-gst-1.0 gir1.2-gtk-3.0 python-distutils-extra gir1.2-webkit-3.0 The sound indicator: bzr branch lp:anoise cd anoise sudo python setup.py install --prefix=/usr The sounds: bzr branch lp:~costales/anoise/media …
764 Days ago
No Thumbnail was found
DevOps is a movement that advocates a collaborative working relationship between Development and IT Operations, where historically they have been separated. Development teams want to launch features fast and frequently while IT Ops wants to maintain infrastructure stability and availability – which means as little changes as possible. Customers want both. 3 key DevOps principles to apply to your IT team  http://blogs.atlassian.com/2015/09/3-key-devops-principles-apply-team/  Software Architecture in DevOps  https://dzone.com/articles/software-architecture-devops  Does DevOps Reduce Technical Debt--or Make it Worse? https://dzone.com/articles/does-devops-reduce-technical-0   Love DevOps? Wait …
1237 Days ago
Linux Compromised server checks checklist
An exploited or hacked server is one that is no longer fully under your control and someone else is now partially using your server for their own purposes. You’ll find in this mind map What bad guys can do and remedies Why a mind map? A mind map is a diagram used to visually outline information. mind map help you take notes, brainstorm complex problems, and think creatively. Information are summarized efficiently to be usable and accessible, Inter-relationships are clear …
1988 Days ago
VIM Cheat Sheet
Essential for any advanced Linux users or Linux sys-admin The color coded Legend / Keys helps provide guidance for your experience level. Green = Essential Yellow = Basic Orange / Blue = Advanced Red = Expert Links One designed for on-screen reading: PDF (Excel 2011 source), One designed for hard-copy reading: PDF (Excel 2011 source), One designed for monochrome printing: PDF (Excel 2011 source), and One designed …
2036 Days ago