建网站框架LAMP之:PHP的安装

下载并解压php7源码包:
https://www.php.net/downloads.php
在这里插入图片描述
2. 文件php-7.3.8.tar.gz放在/usr/local/src
3. tar -zxvf /usr/local/src/php-7.3.8.tar
4. mkdir /usr/local/zwk_php
mv /usr/local/src/php-7.3.8 /usr/local/zwk-php
5. cd /usr/local/zwk-php
./configure --prefix=/usr/local/zwk_php --with-apxs2=/usr/local/zwk_apache/httpd-2.4.41/bin/apxs --with-config-file-path=/usr/local/zwk_php/etc --with-mysql=/usr/local/zwk_mysql --with-pdo-mysql=/usr/local/zwk_mysql --with-mysqli=/usr/local/zwk_mysql/bin/mysql_config --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 --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif

在上一步编译PHP的过程中,我遇到了这些错误:
configure: error: xml2-config not found. Please check your libxml2 installation.
安装所需的包然后继续编译:
yum install -y libxml2-devel

configure: error: Cannot find OpenSSL’s <evp.h>
安装所需的包然后继续编译:
yum install -y openssl openssl-devel

configure: error: Please reinstall the BZip2 distribution
安装所需的包然后继续编译:
yum install -y bzip2 bzip2-devel

configure: error: jpeglib.h not found.
安装所需的包然后继续编译:
yum install -y libpng libpng-devel

configure: error: freetype-config not found.
安装所需的包然后继续编译:
yum install -y freetype freetype-devel

configure: error: mcrypt.h not found. Please reinstall libmcry

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值