Since last month (or two) I am observing this kind of error when running apt-get upgrade
:
Preparing to unpack .../nginx-common_1.9.3-1ubuntu1.2_all.deb ...
Unpacking nginx-common (1.9.3-1ubuntu1.2) over (1.9.3-1ubuntu1.1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx-common_1.9.3-1ubuntu1.2_all.deb (--unpack):
trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx 1.10.1-1~wily
Preparing to unpack .../nginx-core_1.9.3-1ubuntu1.2_amd64.deb ...
Unpacking nginx-core (1.9.3-1ubuntu1.2) over (1.9.3-1ubuntu1.1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx-core_1.9.3-1ubuntu1.2_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/nginx', which is also in package nginx 1.10.1-1~wily
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Though the whole upgrade process doesn't fail, I still have this error mentioned at the end of upgrade process:
Errors were encountered while processing:
/var/cache/apt/archives/nginx-common_1.9.3-1ubuntu1.2_all.deb
/var/cache/apt/archives/nginx-core_1.9.3-1ubuntu1.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
If I understand it correctly, I have version 1.10.1 currently installed while apt is trying to install version 1.9.3 over it... I.e., it's trying to donwgrade it. Am I right? Is it possible that the newer version came from some PPA while the older one is coming from some official list?
I have Ubuntu 15.10 installed.
How can I prevent this downgrade to happen?
EDIT: Here an output from apt-cache policy nginx
nginx:
Installed: 1.10.1-1~wily
Candidate: 1.10.1-1~wily
Version table:
*** 1.10.1-1~wily 0
500 http://nginx.org/packages/ubuntu/ wily/nginx amd64 Packages
100 /var/lib/dpkg/status
1.10.0-1~wily 0
500 http://nginx.org/packages/ubuntu/ wily/nginx amd64 Packages
1.9.3-1ubuntu1.2 0
500 http://de.archive.ubuntu.com/ubuntu/ wily-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ wily-security/main amd64 Packages
1.9.3-1ubuntu1 0
500 http://de.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
1.8.1-1~wily 0
500 http://nginx.org/packages/ubuntu/ wily/nginx amd64 Packages
1.8.0-1~wily 0
500 http://nginx.org/packages/ubuntu/ wily/nginx amd64 Packages
Installed: 1.10.1-1~wily
andCandidate: 1.10.1-1~wily
, then version table with these versions:1.10.1-1~wily 0
,1.10.0-1~wily 0
,1.9.3-1ubuntu1.2 0
,1.9.3-1ubuntu1 0
,1.8.1-1~wily 0
and1.8.0-1~wily 0
. So it all should be fine except forapt-get upgrade
tries to install1.9.3-1ubuntu1.2 0
over my current newest version... I'll add this output to my question. – shadyyx Jun 29 '16 at 13:59