php7.3.7安装踩坑

发生背景:

编译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

 

 

你可能感兴趣的:(php,linux/centos)