Home » Php » problems with libapache2-mod-php5.5.9 on Apache2/Ubuntu 16.04

problems with libapache2-mod-php5.5.9 on Apache2/Ubuntu 16.04

Posted by: admin October 26, 2017 Leave a comment

Questions:

I’ve been given a task that requires me to learn PHP and Apache2. My issue is that I cannot seem to set up my dev environment correctly.

The PHP version I’m required to use is php5.5.9; which I believe I have got installed. I compiled and built the PHP5.5.9 package myself; I can see that this was successful by running:

$ php --version
  PHP 5.5.9 (cli) (built: Oct 25 2017 12:09:34) 
  Copyright (c) 1997-2014 The PHP Group
  Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

My issue now is that I cannot seem to get it to run on Apache2. I still consider myself somewhat of a novice to Linux, and as a result I’m pretty confused. When setting up higher versions of PHP, I just needed to run:

$ apt-get install libapache2-mod-php7

But the package for libapache2-mod-php5.5.9 is not present in any repo’s that I’ve been able to find, and download from, so I assumed I needed, simply libapache2-mod-php5, which throws the following error.

The following packages have unmet dependencies.
 fontconfig : PreDepends: dpkg (>= 1.16.1)
              Depends: fontconfig-config but it is not going to be 
installed
 libapache2-mod-php5 : Depends: libssl1.0.0 (>= 1.0.0) but it is not     
going to be installed
                       Depends: apache2-api-20120211
                       Depends: apache2 (>= 2.4) but it is not going to be installed
                   Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.22) but it is not going to be installed
                   Depends: ucf but it is not going to be installed
                   Depends: tzdata but it is not going to be installed
                   Recommends: php5-cli but it is not going to be 
installed
 libblkid1 : Depends: libuuid1 (>= 2.16) but it is not going to be 
installed
 libfontconfig1 : Depends: fontconfig-config (= 2.11.94-0ubuntu1.1) 
but it is not going to be installed
 libgtk2.0-0 : Depends: libcairo2 (>= 1.6.4-6.1) but it is not going 
to be installed
               Depends: libpangocairo-1.0-0 (>= 1.28.3) but it is not 
going to be installed
               Depends: libpangoft2-1.0-0 (>= 1.28.3) but it is not 
going to be installed
               Recommends: libgtk2.0-bin
 libqt5svg5 : PreDepends: dpkg (>= 1.15.6~)
              Depends: libqt5widgets5 (>= 5.3.0) but it is not going 
to be installed
 libsm6 : Depends: libuuid1 (>= 2.16) but it is not going to be 
installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be 
caused by held packages.

The only advice I’ve been able to find is to downgrade to Ubuntu 14.04, but this isn’t possible at the moment because I’m in the process of loading a fully exported MySQL database to my machine; which has been going for hours, and I cannot see it being done any time soon. Since time is of value, is there any way around this?

Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *