Report this

What is the reason for this report?

Cant upgrade NGINX, overwrite issue?

Posted on June 29, 2016

Trying to update NGINX:

apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 nginx : Depends: nginx-core (< 1.9.3-1ubuntu1.1.1~) but 1.9.3-1ubuntu1.2 is installed or
                  nginx-full (< 1.9.3-1ubuntu1.1.1~) but it is not installed or
                  nginx-light (< 1.9.3-1ubuntu1.1.1~) but it is not installed or
                  nginx-extras (< 1.9.3-1ubuntu1.1.1~) but it is not installed
E: Unmet dependencies. Try using -f.

So I try using -f install:

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:
  nginx
The following packages will be upgraded:
  nginx
1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Need to get 0 B/652 kB of archives.
After this operation, 2,323 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 80899 files and directories currently installed.)
Preparing to unpack .../nginx_1.10.1-1~wily_amd64.deb ...
Unpacking nginx (1.10.1-1~wily) over (1.9.3-1ubuntu1.1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.10.1-1~wily_amd64.deb (--unpack):
 trying to overwrite '/usr/sbin/nginx', which is also in package nginx-core 1.9.3-1ubuntu1.2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nginx_1.10.1-1~wily_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help appreciated :)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there!

Seems you might have some overlapping happening. Have you attempted to clean your cache? You can do that by running apt-get clean all. Once that is done, see what takes place when you run an update against the mirrors with apt-get update then if necessary an apt-get-upgrade to ensure the dependencies are up to date.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.