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
  • 485
  • 3
  • 7
  • 19

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