Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

You can specify version to apt.

For example: apt-get source nginx=1.0.2

share|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. –  ℝaphink Apr 2 '12 at 11:16

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.

share|improve this answer

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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