php7.3.7安装踩坑

博客围绕编译PHP7.3.7时出现的报错展开,如‘off_t undefined’‘system libzip must be upgraded’等,还提及找不到‘zipconf.h’文件、‘LIBZIP_VERSION’未声明等问题,最终给出重新正确安装libzip的解决方案。

发生背景:

编译PHP7.3.7


报错configure: error: off_t undefined; check your library configuration

解决方案:

# 添加搜索路径到配置文件
echo '/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64'>>/etc/ld.so.conf
# 更新配置
ldconfig -v

 

报错configure: error: Please reinstall the libzip distributio 或  configure: error: system libzip must be upgraded to version >= 0.11。

解决方案:

yum remove libzip -y

wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
 
make && make install

# cmake 和 cmake3都要安装
yum install -y cmake
yum install -y cmake3

wget https://libzip.org/download/libzip-1.5.0.tar.gz
tar -zxvf libzip-1.5*
cd libzip-1.5*
mkdir build && cd build && cmake3 .. && make && make install

 

报错/usr/local/include/zip.h:59:21: fatal error: zipconf.h: No such file or directory

解决方案:


cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h

 

 报错/package/php-7.3.7/ext/zip/php_zip.c:3318:48: error: ‘LIBZIP_VERSION’ undeclared (first use in this function)

解决方案:

重新正确安装 libzip

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值