php8安装之路

本文详细介绍了在CentOS系统中编译安装PHP8.0的过程中,如何解决oniguruma和libtidy依赖包缺失的问题。通过提供下载地址和安装步骤,帮助读者成功安装PHP8.0并配置相关选项。同时,给出了遇到找不到包时的解决策略,确保安装过程顺利进行。
摘要由CSDN通过智能技术生成

下载PHP

下载地址:https://www.php.net/downloads.php

解压安装

# 解压
tar -xzvf php-8.0.0.tar.gz
# 安装依赖
yum install openssl-devel gcc gcc-++ gcc-c++ wget make libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel bison autoconf sqlite-devel oniguruma-devel

cd php-8.0.0
#选择安装位置等配置
./configure --prefix=/www/server/php/80/ \
--with-config-file-path=/www/server/php/80/etc  \
--enable-fpm \
--enable-mysqlnd \
--enable-opcache \
--enable-pcntl \
--enable-mbstring \
--enable-soap \
--enable-zip \
--enable-calendar  \
--enable-bcmath \
--enable-exif \
--enable-ftp \
--enable-intl \
--with-mysqli  \
--with-pdo-mysql \
--with-openssl \
--with-curl \
--with-gd \
--with-gettext  \
--with-mhash \
--with-openssl \
--with-mcrypt \
--with-tidy \
--enable-wddx  \
--with-xmlrpc \
--with-zlib

# 安装
make && make install
#配置文件
cp /www/server/php/php-8.0.0/php.ini-production /www/server/php/80/etc/php.ini

#配置/www/server/php/80/etc中php-fpm.conf

问题

1,oniguruma

configure: ERROR: Package requirements (oniguruma) were not met: No
package ‘oniguruma’ found

yum install oniguruma oniguruma-devel
# 如果失败找不到包
yum -y install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-6.8.2-1.el7.x86_64.rpm
yum -y install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/oniguruma-devel-6.8.2-1.el7.x86_64.rpm

2, libtidy

configure: error: Cannot find libtidy

yum install libtidy libtidy-devel
# 如果失败找不到包 同上

帮助网站

下载linux依赖网站:https://pkgs.org/

参考文章

centos7 下安装 php8.0, 开启jit
CentOS 编译错误+配置错误解决方法集合
CentOS下编译php时的一些典型错误及解决办法

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值