4

I'm running Ubuntu 12.04 Server:

user@host:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:        12.04
Codename:       precise

My issue is this: When I go to upgrade packages (specifically looking for php5, but it happens for many/most/all) this is what I get:

user@host:~$ sudo 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:
 apache2-suexec-custom : Depends: apache2-bin but it is not installed
E: Unmet dependencies. Try using -f.


user@host:~$ sudo apt-get -f install
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:
  libnet-xwhois-perl libtommath0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  apache2-bin
The following NEW packages will be installed:
  apache2-bin
0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
1 not fully installed or removed.
Need to get 0 B/953 kB of archives.
After this operation, 3576 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 95668 files and directories currently installed.)
Unpacking apache2-bin (from .../apache2-bin_2.4.16-4+deb.sury.org~precise+4_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_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
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_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

What can I do to resolve these errors? I'd really like to get a PHP version newer than 5.3, since I have multiple items that require PHP v5.4 minimum.

NOTE: I am not trying to fix the locale issue, I'm trying to fix the dpkg error. This server has always had a locale issue, and it's completely separate. Sorry, but this ain't no duplicate.

Edits for added code:

user@host:~$ sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of apache2-suexec-custom:
 apache2-suexec-custom depends on apache2-bin; however:
  Package apache2-bin is not installed.
dpkg: error processing apache2-suexec-custom (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 apache2-suexec-custom



Output of sudo apt-get install apache2:

user@host:~$ sudo apt-get install apache2
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:
 apache2 : Depends: apache2-bin (= 2.4.16-4+deb.sury.org~precise+4) but it is not going to be installed
           Depends: apache2-data (= 2.4.16-4+deb.sury.org~precise+4) but it is not going to be installed
           Conflicts: apache2.2-bin but 2.2.22-1ubuntu1.10 is to be installed
           Conflicts: apache2.2-common but 2.2.22-1ubuntu1.10 is to be installed
 apache2-suexec-custom : Depends: apache2-bin but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).






OK, so here's what I just discovered. Things seem to work OK with apache2-suexec-custom removed. But I still get this:

user@host:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  apache2 libapache2-mod-php5 libjson0:i386 php-apc php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-dev php5-fpm php5-gd php5-imagick php5-imap php5-intl
  php5-ldap php5-mcrypt php5-memcache php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.

user@host:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.

So what's with the 29 not upgraded? I'm going to browse around and look for the answer in other questions in the meantime...

SWEET!!! See DanielSmith-Chatbot's answer for my solution...

10
  • 2
    Possible duplicate of How do I fix my locale issue? Nov 26, 2015 at 2:11
  • Scroll down @CharlesGreen and upvoter. This server has always had that issue and it's been fine. I'm trying to fix the dpkg error.
    – Daniel
    Nov 26, 2015 at 2:36
  • It's not entirely relevant to your situation, but the answers in this answer may help resolve the problem Nov 26, 2015 at 3:06
  • See edits to question.
    – Daniel
    Nov 26, 2015 at 3:28
  • I'm stumped here.
    – Daniel
    Nov 26, 2015 at 3:30

3 Answers 3

2
+50

OK here's what the issue was:

There was a severely messed up package by the name of apache2-suexec-custom that needed and hated the same package. Remove that, and the other packages are now dist-upgradeable. Run sudo apt-get dist-upgrade ; sudo apt-get upgrade and everything is upgraded.

Thanks for your help(ish) guys! Not an expectedd solution, but it worked!

1
0

Does this help ? :

sudo apt-get install --reinstall apache2 --fix-missing

or if this was not sufficient, then try to install with package-manager of unity all packages regarding "lamp" as search-word, then all necessary packages are listed.

If above was not of help then this link should contain the answers:

The following packages have unmet dependencies (apache)

And there is:

How do I resolve unmet dependencies after adding a PPA?

5
  • nope, it gives me unmet dependancy.
    – Daniel
    Dec 5, 2015 at 0:37
  • @Daniel - check out if apache2 depends on libraries like libc or glibc ?! - wait I look after this ... moment please. Dec 5, 2015 at 1:00
  • well, sudo apt-get install libc* still gives me unmet dependencies. I'm beginning to think that the repo (or one of my repos) may be corrupt.
    – Daniel
    Dec 5, 2015 at 2:05
  • OK, see this error: km4ayu.com/errors/error4.txt
    – Daniel
    Dec 5, 2015 at 2:14
  • It appears that apache2-bin is BOTH a dependency and a conflicting package.
    – Daniel
    Dec 5, 2015 at 2:15
-1

please check your locale setting on server

You can see solution in here topic: How do I fix my locale issue?

4
  • if you had try to fixed locale but success, please remove sudo apt-get remove --purge apache2-suexec-custom and reinstall it Nov 26, 2015 at 4:09
  • the link may be an answer but your post is not
    – user284234
    Nov 26, 2015 at 9:28
  • I tried this and it didn't help this issue.
    – Daniel
    Nov 27, 2015 at 16:49
  • But it did, however, fix the locale issue. But this is an irrelevant answer.
    – Daniel
    Nov 27, 2015 at 16:49

You must log in to answer this question.

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