2

after:
apt-get install curl

I get:

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:
 libapache2-mod-php5 : Depends: apache2-api-20120211
                       Depends: apache2 (>= 2.4)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

and then:

apt-get -f install

gives me:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libbsd0 apache2-mpm-prefork apache2.2-common apache2.2-bin
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  apache2 apache2-bin apache2-data
Suggested packages:
  apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
16 not fully installed or removed.
Need to get 0 B/1259 kB of archives.
After this operation, 4749 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 73022 files and directories currently installed.)
Unpacking apache2-bin (from .../apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2.2-common 2.2.22-1ubuntu1.10
dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Unpacking apache2-data (from .../apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb (--unpack):
 trying to overwrite '/usr/share/apache2/icons/a.png', which is also in package apache2.2-common 2.2.22-1ubuntu1.10
dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Unpacking apache2 (from .../apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/apache2/ask-for-passphrase', which is also in package apache2.2-common 2.2.22-1ubuntu1.10
dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb
 /var/cache/apt/archives/apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb
 /var/cache/apt/archives/apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried removing explicitly:

/var/cache/apt/archives/apache2-bin_2.4.16-3+deb.sury.org~precise+1_amd64.deb /var/cache/apt/archives/apache2-data_2.4.16-3+deb.sury.org~precise+1_all.deb /var/cache/apt/archives/apache2_2.4.16-3+deb.sury.org~precise+1_amd64.deb

but the next apt-get -f install gives me the same error.

I'm going in circle here, any help is appreciated.

  • 1
    Could you surround the output in code/pre tags to make it easier to read? It looks like you have conflicting apache installs; apache2 and apache2.2-common. Did you install Apache using something other than apt at some point? – Nathan V Aug 26 '15 at 18:29
  • No I did not. But I wanted to install php5 without having to install Apache. So if you think the issue is from Apach installs, how can I uninstall them and have only php5 – Serge Dacic Aug 26 '15 at 20:31
  • Try clearing the cache; #sudo apt-get clean – TheJulyPlot Aug 26 '15 at 20:43
  • I tried but still get the same issues – Serge Dacic Aug 26 '15 at 21:07
  • Make sure you are not explicitly removing the /var/cache/apt directories when you run it. – TheJulyPlot Aug 26 '15 at 21:15

Your Answer

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

Browse other questions tagged or ask your own question.