码迷,mamicode.com
首页 > 其他好文 > 详细

LAMP环境编译安装问题总结

时间:2015-12-04 21:08:36      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:lamp

apache:

问题:

安装apache的时候入到 error: mod_deflate has been requested but can not be built due to prerequisite failures的错误。

解决:

没有安装zlib包。运行命令:

yum install zlib-devel


PHP:

问题:

编译安装php出错mcrypt.h not found. Please reinstall libmcrypt

yum install libmcrypt libmcrypt-devel之后编译,还是报错。

解决:

编译PHP时, --with-mcrypt=/usr/local/libmcrypt/ 加入mcrypt路径。即可解决问题。

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc  --with-mysql=/usr/local/mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt=/usr/local/libmcrypt/ --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6


问题:

configure: error: xml2-config not found. Please check your libxml2 installation.

解决:

yum install -y libxml2-devel

总结:编译安装LAMP前,把事先需要安装的库用yum安装下。避免发生一些错误。
yum install -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
再遇到问题,根据错误提示。解决。一般问题都是因为缺少安装所需要的库导致。

本文出自 “lna” 博客,请务必保留此出处http://244928237.blog.51cto.com/3836002/1719594

LAMP环境编译安装问题总结

标签:lamp

原文地址:http://244928237.blog.51cto.com/3836002/1719594

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!