0

While attempting to install the package sw-nginx I encountered the following error messages:

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/327 kB of archives.
After this operation, 813 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
sw-nginx
Authentication warning overridden.
(Reading database ... 149469 files and directories currently installed.)
Unpacking sw-nginx (from .../sw-nginx_1.6.0-1.14051516.debian70_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/sw-nginx_1.6.0-1.14051516.debian70_amd64.deb (--unpack):
trying to overwrite '/etc/logrotate.d/nginx', which is also in package nginx 1.6.2-1~wheezy
dpkg-deb (subprocess): decompressing archive member: internal gzip write error: Broken pipe
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg-deb (subprocess): cannot copy archive member from '/var/cache/apt/archives/sw-nginx_1.6.0-1.14051516.debian70_amd64.deb' to decompressor pipe: failed to write (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/sw-nginx_1.6.0-1.14051516.debian70_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: An error occurred on attempt to install packages.
Attention! Your software might be inoperable.
Please, contact product technical support.

How can I install this package?

  • You're trying to install a package which has a file which conflicts with a file already installed and registered by another software package. The two packages are sw-nginx and nginx. A little investigation should suffice to figure out what is going on here. – Faheem Mitha Sep 22 '14 at 9:32
  • My Debian installation has not heard of sw-nginx. What is the output of apt-cache policy sw-nginx? Or putting it differently, where did you get sw-nginx from? – Faheem Mitha Sep 22 '14 at 9:34
  • This is part of Plesk repository. – Uhl Hosting Sep 23 '14 at 22:30
  • Well, it is incompatible with nginx, so I suggest you remove nginx first. – Faheem Mitha Sep 23 '14 at 22:31
-1

I figured out how to work around my issue by doing the installation like so:

$ sudo dpkg -i --force-overwrite packagename

It would appear that I was getting collisions from a different nginx package that had files in common with this new package. I opted for the heavy handed method and simply did the above, --force-overwrite.

DO NOT USE :) Its useless it breaks it in another place...

  • Though this may look like it solved your issue, it's probably the lease liked method to use, since you essentially just smashed 2 packages together. – slm Sep 22 '14 at 1:25
  • Using --force-anything if you don't know what you are doing is a bad idea. – Faheem Mitha Sep 22 '14 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.