在ubuntu 12.04上安装apache 2.4和php 5.5

 Lala88童鞋_619 发布于 2023-01-31 07:42

我正在尝试使用ubuntu 12.04在vm上设置apache 2.4和php 5.5的测试环境,首先是添加存储库

apt-add-repository ppa:ptn107/apache
apt-add-repository ppa:ondrej/php5

然后安装apache 2.4

apt-get install apache2-mpm-worker

检查apache版本:

# apache2 -v
Server version: Apache/2.4.6 (Ubuntu)
Server built:   Sep 23 2013 07:23:34

安装PHP 5.5

apt-get install php5-common php5-mysqlnd php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-imap php5-mcrypt

检查php版本

php -v
PHP 5.5.8-3+sury.org~precise+1 (cli) (built: Jan 24 2014 10:15:11) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
     with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies

所以看起来很好,我需要mod_fastcgi,但无法安装:

apt-get install libapache2-mod-fastcgi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libapache2-mod-fastcgi : Depends: apache2.2-common (>= 2.2.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

因此,如果无法启用mod_fastcgi,我怎么能用php-fpm运行php文件?有什么我想念的吗?

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有