I'm working on updating Nginx on my server from 0.7.65 (Ubuntu 10.04 repo) to 1.0.2 (from the PPA). I installed it just fine, but I would like to add/activate some modules. I found this tutorial for doing it with dpkg, which works well for ensuring that it maintains the defaults that apt-get uses for things like install location, and would like to use it to do the same for 1.0.2.

However, when I run apt-get source nginx, it downloads the 0.7 source from the main repo, and when I run apt-get source nginx-full or apt-get source nginx-common, it selects nginx instead.

Is there any way I can force it to get the source from the PPA, so that I can use dpkg and not have to deal with hacking in the Debian folder that dpkg requires?

link|improve this question

25% accept rate
feedback

3 Answers

You can specify version to apt.

For example: apt-get source nginx=1.0.2

link|improve this answer
Sorry it's taken me so long to respond. That worked to attempt to get the package (and it actually found it), but it didn't download it. It came up with Ignore unavailable version '1.0.2-0ppa1~lucid' of package 'nginx'. Unable to find a source package for nginx. 'apt-cache policy nginx` returns 1.0.2-0ppa1~lucid for the first listing of available sources and the Candidate. – Shauna May 31 '11 at 11:44
Try with a wildcard: apt-get source nginx=1.0.2* maybe. – Raphink Apr 2 at 11:16
feedback

To expand on @mboehn's answer: you can see the available versions of a package (and which repositories they come from) with apt-cache policy package.

link|improve this answer
feedback

Add the following to /etc/apt/sources.list.d/nginx-stable-lucid.list

deb-src http://ppa.launchpad.net/nginx/stable/ubuntu lucid main
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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