Installing apache 2.4 and php 5.5 on ubuntu 12.04

 ̄綄美尐妖づ 提交于 2019-12-02 23:13:07

You can install the fastcgi mod and apache2 from here, verified that it works on my end. https://launchpad.net/~ondrej/+archive/apache2?field.series_filter=precise

Decoded

in addition to suci and wedev's answer above, if you see an error like:

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

because you did something dumb (like I did for example with an attempt to install php5 over top of php2.3 provided by the ubuntu image I'm working with), you can run the following commands:

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

as outlined here: https://askubuntu.com/questions/666720/ubuntu-apt-get-upgrade-error-on-ubuntu-12-04 by user3703155

which I believe instruct the package manager to stomp over any broken dependencies regarding the apache2 installation.

Subsequently running

apt-get install -f 

followed by

apt-get dist-upgrade

and it was all happy after that.

php -version
PHP 5.5.30-1+deb.sury.org~precise+1 (cli) (built: Oct  4 2015 16:14:34) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with XCache Optimizer v3.2.0, Copyright (c) 2005-2014, by mOo
with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo
with XCache Coverager v3.2.0, Copyright (c) 2005-2014, by mOo
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!