php docker镜像 checking for libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0... no configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:
错误:
checking for libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0... no configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met: No package 'libzip' found No package 'libzip' found No package 'libzip' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBZIP_CFLAGS and LIBZIP_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. ERROR: Service 'webapi' failed to build : The command '/bin/sh -c apt-get update && apt-get install libzip4 && docker-php-ext-install zip' returned a non-zero code: 1
解决方法:
您必须猜测您需要安装的包称为“libzip-dev”,而不仅仅是“libzip”。
所以解决方案是:
RUN apt-get update \ && apt-get install -y libzip-dev \ && docker-php-ext-install zip