Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install the nginx on ppa:nginx/stable on Lucid after removing the one that comes from the default sources but I get this error:

` Setting up nginx-common (0.8.54-4ppa13~lucid) ...
dpkg: error processing nginx-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx-full:
 nginx-full depends on nginx-common (= 0.8.54-4ppa13~lucid); however:
  Package nginx-common is not configured yet.
dpkg: error processing nginx-full (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-full; however:
  Package nginx-full is not configured yet.
dpkg: error processing nginx (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:

I've try apt-get clean, dpkg --configure -a, apt-get -f install nginx-common but nothing is helping. Am I missing something?

Here's the output from dpkg-query -W -f='${Package}\t${Version}\n' nginx*

`nginx   0.8.54-4ppa13~lucid
nginx-common    0.8.54-4ppa13~lucid
nginx-full      0.8.54-4ppa13~lucid
share|improve this question
Ran into this issue. apt wouldn't configure nginx-full because Apache was already running on port 80. sudo service apache2 stop fixed the problem, nginx successfully installed. – Ahmed Fasih Jun 18 '15 at 5:16
up vote 2 down vote accepted

Edit /var/lib/dpkg/info/nginx-common.postinst, comment "chmod -f 0640 $logdir/*" line. Then run install:

sudo apt-get install nginx

Or create file access.log:

sudo touch /var/log/nginx/access.log
sudo apt-get install nginx


    chmod 0750 $logdir
#    chmod -f 0640 $logdir/*

I write small note(Russian language!)

share|improve this answer
sudo mkdir /var/log/nginx && sudo touch /var/log/nginx/access.log && sudo apt-get install nginx – farinspace Mar 1 '11 at 3:48
test -d /var/log/nginx/ || sudo mkdir /var/log/nginx && sudo touch /var/log/nginx/access.log && sudo apt-get install nginx. if /var/log/nginx exist, touch and apt-get don't run. – ooshro Mar 1 '11 at 4:01
Awesome, thanks! It worked perfectly. Commenting out chmod -f 0640 $logdir/ fixed the isssue – MrD Mar 1 '11 at 5:52

The postinst script, which runs at the end of the nginx-common installation, encountered an error. You can find the script at /var/lib/dpkg/info/nginx-common.postinst. If you look at this script and can figure out what is failing, you can report the problem to the maintainers of ppa:nginx/stable.

share|improve this answer

Your Answer


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.