#下载国内gitee源
git clone https://gitee.com/RoseKissYou/php
cd php/php8
tar -zxvf php-8.0.0alpha1.tar.gz
cd php-8.0.0alpha1
#编译
./configure --prefix=/usr/local/php8 \
--with-config-file-path=/usr/local/php8 \
--enable-mbstring \
--enable-ftp \
--enable-gd \
--enable-gd-jis-conv \
--enable-mysqlnd \
--enable-pdo \
--enable-sockets \
--enable-fpm \
--enable-xml \
--enable-soap \
--enable-pcntl \
--enable-cli \
--with-openssl \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-zlib \
--with-iconv \
--with-curl \
#安装
make && make install
报错处理1 configure: error: Package requirements (sqlite3 > 3.7.4) were not met
默认centos7的sqlite3的版本是3.7.17 这里需要3.7.4
centos7升级sqlite3 官网 https://www.sqlite.org/
# 下载
wget https://www.sqlite.org/2020/sqlite-autoconf-3320300.tar.gz
tar sqlite-autoconf-3320300.tar.gz
# 编译
cd sqlite-autoconf-3320300
./configure --prefix=/usr/local
make && make install
# 替换原版
mv /usr/bin/sqlite3 /usr/bin/sqlite3_old
ln -s /usr/local/bin/sqlite3 /usr/bin/sqlite3
echo "/usr/local/lib" > /etc/ld.so.conf.d/sqlite3.conf
ldconfig
sqlite3 -version
参考链接https://www.cnblogs.com/leffss/p/11555556.html
报错处理2 make报错
make: *** No targets specified and no makefile found. Stop
第一、update最新版本系统软件
yum update
这个必须要执行后才可以安装我们的系统软件或者一键包。
第二、编译缺失关联软件
yum install gcc build-essential
编译执行完毕之后,我们在执行./configure && make这类的执行命令就可以解决问题。
如果还不能解决,安装下面扩展
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-develfreetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-develglib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devele2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel opensslopenssl-devel openldap openldap-devel nss_ldap openldap-clientsopenldap-servers
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
./configure -prefix=/usr/local -with-shared -without-debug
make
make install