Wake Me Up When September Ends.

A wanderer capable of grasping the beauty of the grass, with a heart full of ancient charm, and a fondness for playful wit. Those who understand my words are knowledgeable individuals; those who decipher my code truly comprehend the essence. I am a wandering code swordsman, carrying my skills and riding freely through the digital world.

php56 安装zip 扩展报错

问题

因为部分老项目使用5.6版本且部分功能依赖zip扩展 ,所以在镜像(apline)构建安装zip扩展,安装过程中报如下错误:

1
Please reinstall the libzip distribution

解决办法

1
2
3
4
5
6
7
apk update 

apk add zlib-dev

pecl install zip // 或 docker-php-ext-install zip

docker-php-ext-enable zip

补充

可能还有其他问题,不过我本机可能只缺少这些依赖,所以安装成功了