Linux php7.3编译报错,libzip 1.5.1安装解决方法 1.3.2
configure: error: Please reinstall the libzip distribution报错
yum安装
yum -y install libzip-devel
继续报错,checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11
查看了下系统是0.9版本
包 libzip-devel-0.9-3.1.el6.x86_64 已安装并且是最新版本
但是php7.3要求大于0.11版本。。
官网找到最新的1.5.1:https://libzip.org/
yum -y remove libzip-devel
yum -y install cmake
wget https://libzip.org/download/libzip-1.5.1.tar.gz
tar xvf libzip-1.5.1.tar.gz
cd libzip-1.5.1
mkdir build
cd build
cmake ..
make
make install
输出???
CMake Error at CMakeLists.txt:4 (CMAKE_MINIMUM_REQUIRED):
CMake 3.0.2 or higher is required.You are running version 2.8.12.2
-- Configuring incomplete, errors occurred!
好吧,垃圾开发者做的软件,还要求CMake 版本,去 cmake.org 下载是不可能的,这辈子都是不可能的,有yum为什么不yum呢,这群老外就是搞事情,一个编译库也能折腾
解决方法,我下旧版还不行吗QWQ,看github发现1.4.0开始要cmake的,下1.3.2解决
yum -y remove libzip-devel
wget https://libzip.org/download/libzip-1.3.2.tar.gz
tar xvf libzip-1.3.2.tar.gz
cd libzip-1.3.2
./configure
make -j 4
make install
如果php编译遇到configure: error: off_t undefined; check your library configuration
官方BUG:https://bugs.php.net/bug.php?id=73943
查看到文件确实存在
find /usr/ -iname 'libzip.so'
/usr/local/lib/libzip.so
解决方法1,创建软连接
mv -f /usr/lib64/libzip.so.5 /usr/lib64/libzip.so.5.bak
ln -s /usr/local/lib/libzip.so.5 /usr/lib64/libzip.so.5
解决方案2,因为没有配置系统动态链接库,手动创建个
ln -s /usr/local/lib/pkgconfig/libzip.pc /usr/lib64/pkgconfig/libzip.pc
echo '/usr/local/lib' > /etc/ld.so.conf.d/libzip.conf
ldconfig -v
页:
[1]