Su's Blog

Kratos
专注于用户阅读体验的响应式博客主题
  1. Main page
  2. Uncategorized
  3. Main content

宝塔面板下php安装archive zip扩展

October 16, 2022 1909hotness 0likes 0comments

先删除旧版本
yum remove -y libzip
#下载编译安装
wget https://libzip.org/download/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make && make install

安装完成后,查看是否存在/usr/local/lib/pkgconfig目录,如果存在,执行如下命令来设置PKG_CONFIG_PATH:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"

编译
cd /www/server/php/81/src/ext/zip/
/www/server/php/81/bin/phpize
./configure --with-php-config=/www/server/php/81/bin/php-config
make && make install

然后在 PHP 8.1 管理 → 配置文件末尾处,添加:
echo "extension = zip.so" >> /www/server/php/81/etc/php.ini

restart php

Tag: Nothing
Last updated:October 16, 2022

Su

This person is a lazy dog and has left nothing

Like
< Last article
Next article >

Comments

razzevilexclaimsmileredfacebiggrineekconfusedidealolmadtwistedrolleyeswinkcoolarrowneutralcrymrgreendroolingpersevering
Cancel

COPYRIGHT © 2024 Su's Blog. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok