Skip to content

docker-php-ext-install zip fails #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
schmunk42 opened this issue Jan 12, 2015 · 6 comments
Closed

docker-php-ext-install zip fails #61

schmunk42 opened this issue Jan 12, 2015 · 6 comments

Comments

@schmunk42
Copy link

It requires the zlib system package, a workaround is to add this to your Dockerfile

RUN apt-get update && \
    apt-get install -y \
        zlib1g-dev
@yosifkit
Copy link
Member

See docs forthcoming: docker-library/docs#130

@tianon
Copy link
Member

tianon commented May 19, 2015

Fixed via documentation in docker-library/docs#130.

@tianon tianon closed this as completed May 19, 2015
@jonbaldie
Copy link

If it helps anyone using the Alpine image, I succeeded with zlib-dev.

@qiangli
Copy link

qiangli commented Mar 2, 2019

for php:7.3-apache/debian

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --fix-missing \
    apt-utils \
    gnupg

RUN echo "deb http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list
RUN echo "deb-src http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list
RUN curl -sS --insecure https://www.dotdeb.org/dotdeb.gpg | apt-key add -

RUN apt-get update && apt-get install -y \
    zlib1g-dev \
    libzip-dev
RUN docker-php-ext-install zip

@baldasso
Copy link

If it helps anyone using the Alpine image, I succeeded with zlib-dev.

In Alpine I have to install libzip-dev too: apk add libzip-dev

@clarg18
Copy link

clarg18 commented Jul 7, 2020

Did anyone get this working?

FROM php:7.4-fpm-alpine

WORKDIR /var/www/html

RUN docker-php-ext-install pdo pdo_mysql zip

I get the zlib needed error. I added the code above but it says apk-get is not found.

EDIT:

this worked:

RUN apk add --no-cache zip libzip-dev
RUN docker-php-ext-configure zip
RUN docker-php-ext-install zip
RUN docker-php-ext-install pdo pdo_mysql 

@docker-library docker-library locked as resolved and limited conversation to collaborators Jul 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants