I want to install the latest nginx using apt on ubuntu lucid.

I followed the instructions on the nginx wiki and added the source:

echo "deb  http://ppa.launchpad.net/nginx/stable/ubuntu lucid main" >> /etc/apt/sources.list

the problem is the latest stable version is 0.7.67 but when i use apt-cache show, it shows as 0.7.65

how do i install the latest version using apt? i had the same problem with php,mysql etc so i've been installing everything from source, but i'm wondering whether i can get all the latest versions with apt.

  • still can't get this working, any help appreciated – mononym Sep 14 '10 at 12:51
  • What does apt-cache policy nginx say? – ℝaphink Sep 15 '10 at 9:38
  • shows nothing in version table (after i uncommented out the ubuntu universe files), now can't find nginx (this is progress) – mononym Sep 15 '10 at 15:11
  • in my sources file i have: deb ppa.launchpad.net/nginx/stable/ubuntu lucid main (seems to be ignoring it) – mononym Sep 15 '10 at 15:12

I think that you must be especific with the commands:

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx=0.7.67-4ppa1

Just remember to put the version of nginx from the launchpad package.

| improve this answer | |

First off, make sure you follow ALL the instructions:

sudo su -
echo "deb  http://ppa.launchpad.net/nginx/stable/ubuntu lucid main" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
apt-get update 
apt-get install nginx

When you run apt-get update, do you get any errors for the nginx repository? Because the latest version in the nginx repo is 0.7.67.

| improve this answer | |
  • i followed all the instructions except the last one (install) as i want to ensure its the latest version before installing – mononym Sep 14 '10 at 3:00
  • 0.8.50 is latest development release not stable – mononym Sep 14 '10 at 3:00
  • Ah, my apologies--the link on the Wiki was incorrect (pointed to the development page). The latest stable version is located here: launchpad.net/~nginx/+archive/stable; will update my answer accordingly. – Andrew M. Sep 14 '10 at 3:08
  • no problem, no errors from the repo, and if i navigate to it via http (ppa.launchpad.net/nginx/stable/ubuntu/pool/main/n/nginx), it show the package as 0.7.67, yet apt-cache show tells me different – mononym Sep 14 '10 at 3:12
  • when running apt-get update it is saying: Ign ppa.launchpad.net/nginx/stable/ubuntu lucid/main Translation-en_GB i'm guessing ign stands for ignore – mononym Sep 14 '10 at 4:09

Did you do an $ apt-get update after adding that line to your sources.list? That step is necessary to update apt's local package databases.

| improve this answer | |
  • yes i ran apt-get update afterwards – mononym Sep 14 '10 at 2:53
  • When you run the update, do you see any entries about it contacting the launchpad repo? – EEAA Sep 14 '10 at 2:55
  • yes: Get: 3 ppa.launchpad.net lucid/main Packages [14B] – mononym Sep 14 '10 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.