温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

LAMP环境编译安装问题总结

发布时间:2020-05-27 13:15:29 来源:网络 阅读:372 作者:jingzheng2010 栏目:网络安全

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
再遇到问题,根据错误提示。解决。一般问题都是因为缺少安装所需要的库导致。
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI