0

I understand that this is a generic error message, but I'm having trouble deciphering what's going on - why doesn't Apache want to update?

(Reading database ... 50302 files and directories currently installed.)
Unpacking apache2-bin (from .../apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb (--unpack):
 trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2.2-common 2.2.22-1ubuntu1.8
dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Preparing to replace e2fslibs 1.42-1ubuntu2.2 (using .../e2fslibs_1.42-1ubuntu2.3_i386.deb) ...
Unpacking replacement e2fslibs ...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

2 Answers 2

0

The real error is:

"trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2.2-common 2.2.22-1ubuntu1.8"

It looks like there is a file conflict between packages from some third party repo and packages from ubuntu itself. Given that it's just a manpage i'd suggest forcing the install with.

dpkg -i --force-overwrite /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb

1
  • Now it gives the error mod_auth_mysql.so: undefined symbol: ap_requires Commented Oct 22, 2015 at 2:21
0

By default, dpkg will not overwrite files belonging to another package - and "ownership" of files by particular packages can change when packages get renamed or a collection of packages gets restructured.

You need to either run apt-get with the -o Dpkg::Options::="--force-overwrite" option like this:

apt-get -o Dpkg::Options::="--force-overwrite" ...

or you can make this permanent by adding it to /etc/apt/apt.conf or a file in /etc/apt/apt.conf.d/ like so:

DPkg { Options {"--force-overwrite";} };

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .