Ext-zip problem in Composer

Asked

Viewed 28 times

0

Good morning, I need to install the class phpoffice/phpspreadsheet via Poser, but always tell me that ext-zip is not installed on my machine, the big problem is that I have installed all the possible ones: php7.3-zip, php-zip, zip and nothing working.

In phpinfo it shows that everything is ok, but still the class does not install.

I am trying to do the installation in a Docker container with: apache2 and php7.3.14 in a debian:10.2-slim

Someone’s been through it and has a light on how to fix it?

inserir a descrição da imagem aqui

1 answer

0

Guys, after a lot of research on foreign sites, I saw something that was obvious to find the error, I used the command "Composer show -p" and he listed all the extensions installed and to my surprise, I did not have the zip and all were with php7.3.12, a different version of my container which is php7.3.14. With this, at the time I realized that Composer looks at php installed on my local machine (I didn’t even know that PHP was installed on the MAC), not in the container.

So my doubt has changed, turned around how to make Composer ignore my machine and look at the container, for now I will try to edit the Docker-Composer so it always goes up the container running Composer update, it is not ideal but will serve until you figure out a way to optimize it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.