Saturday, January 29, 2011

how to get latest nginx using apt - ubuntu

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.

  • 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.

    mononym : yes i ran apt-get update afterwards
    ErikA : When you run the update, do you see any entries about it contacting the launchpad repo?
    mononym : yes: Get: 3 http://ppa.launchpad.net lucid/main Packages [14B]
    From ErikA
  • 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.

    mononym : i followed all the instructions except the last one (install) as i want to ensure its the latest version before installing
    mononym : 0.8.50 is latest development release not stable
    Redmumba : Ah, my apologies--the link on the Wiki was incorrect (pointed to the development page). The latest stable version is located here: https://launchpad.net/~nginx/+archive/stable; will update my answer accordingly.
    mononym : no problem, no errors from the repo, and if i navigate to it via http (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 : when running apt-get update it is saying: Ign http://ppa.launchpad.net/nginx/stable/ubuntu/ lucid/main Translation-en_GB i'm guessing ign stands for ignore
    From Redmumba
  • 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.

0 comments:

Post a Comment