jimmyeao
By:
jimmyeao

Cant upgrade NGINX, overwrite issue?

June 29, 2016 1.2k views
Nginx

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 :)

1 comment
  • Also have this issue - did you resolve it? The answer from Mo didnt help in my situation

1 Answer

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.

Have another answer? Share your knowledge.