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 use apt-get to install imagick. Should be simple enough. This is my command.

apt-get install imagemagick libmagickcore-dev libmagickwand-dev

However instead of installing it keeps bouncing back with this error message

The following packages have unmet dependencies:
nginx-full: Depends: nginx-common (= 1.0.4-1ppa1~lucid) but it is not going to be installed 
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

No worries, so I try apt-get -f install

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
2 not fully installed or removed.
Need to get 0B/59.4kB of archives.
After this operation, 246kB of additional disk space will be used.
Do you want to continue [Y/n]?

Yep let's continue Y

But then it gives me this:

(Reading database ... 23160 files and directories currently installed.)
Unpacking nginx-common (from .../nginx-common_1.0.4-1ppa1~lucid_all.deb) ...
dpkg: error processing /var/cache/apt/archives/nginx-common_1.0.4-1ppa1~lucid_all.deb (--unpack):
 trying to overwrite '/etc/ufw/applications.d/nginx', which is also in package nginx 0:1.0.0-0ppa1~lucid
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've tried stopping the nginx service. I did an apt-get update, but all to no avail :(

Any help would be greatly appreciated.

share|improve this question
up vote 2 down vote accepted

This does not solve it by ignoring dependencies, but 2 of your packages seem to be claiming ownership of the file /etc/ufw/applications.d/nginx . If you move it out of the way (mv /etc/ufw/applications.d/nginx ~/nginx-ufw-tmp), and try the apt-get -f install again, it should not be complaining about this file anymore. Afterwards, you can compare the old and the new /etc/ufw/applications.d/nginx and decide which one you want to keep. Please note that this is an exceptional situation, you seem to have installed nginx from a ppa source?

share|improve this answer
Thanks for that, It worked great! I was trying to upgrade to the latest version of nginx a few weeks back so that must have done it I think. Broke some of the config files for my website though, but got it all sorted now. – Emmanuel Jun 8 '11 at 11:49

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.