0

I tried to install imagemagick using following command

sudo apt-get install imagemagick --fix-missing

But while installing I get following error

nginx-full : Depends: nginx-common (= 1.4.7-1+precise0) but 1.6.0-1+precise0 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I tried to remove the nginx using sudo apt-get remove nginx command but getting same error how can I resolve this issue.

Edit By referring this link output ofdpkg -l | grep nginx

iU  nginx                                  1.4.7-1+precise0                                    small, powerful, scalable web/proxy server
ii  nginx-common                           1.6.0-1+precise0                                    small, powerful, scalable web/proxy server - common files
iF  nginx-full                             1.4.7-1+precise0                                    nginx web/proxy server (standard version)

output of dpkg -S $(which nginx)

dpkg-query: error: --search needs at least one file name pattern argument
Use --help for help about querying packages.

Thanks in advance.

user2622247
  • 475
  • 3
  • 7
  • 19
  • Did you try **sudo apt-get -f install**? – OdinRW Jun 26 '14 at 07:24
  • yes I tired but getting same error. – user2622247 Jun 26 '14 at 07:25
  • Try to install it from this link [here](https://help.ubuntu.com/community/ImageMagick#Installation). It will ask you to open the software center. If the software center prompt an error write it back please. – OdinRW Jun 26 '14 at 07:28
  • I am referring same link for installation – user2622247 Jun 26 '14 at 07:29
  • Try to completely remove and reinstall nginx-full. Apparently this is a common dependency problem. Then try to install imagemagick. – OdinRW Jun 26 '14 at 07:32
  • **sudo apt-get update && sudo apt-get remove nginx* && sudo apt-get install nginx-full** – OdinRW Jun 26 '14 at 07:33
  • Here is a complete [description](http://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies) of the problem but the solution is long. Reinstalling all the packages will do the job. – OdinRW Jun 26 '14 at 07:35

1 Answers1

1

Run :

sudo dpkg -r nginx-common

If it is successful or not run:

gksudo gedit /var/lib/dpkg/status

In the resulting gedit remove the whole section starts with:

Package : nginx-common

then run the installation