composer error : ext-zip * -> the requested PHP extension zip is missing from your system.
mikevolmar opened this issue · 1 comments
New install appears to be fine. Except, I'm running into an error with php-fpm trying to install phpoffice/spreadsheets missing a dependency ext-zip
composer require phpoffice/phpspreadsheet
Using version ^1.15 for phpoffice/phpspreadsheet
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0].
- phpoffice/phpspreadsheet 1.15.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
Installation failed, deleting ./composer.json.
Anyone know how to fix this issue?
Edit app/composer.json fisrt.
"require": { "symfony/yaml": "^5.2", "phpoffice/phpspreadsheet": "*" }
then run command like this
docker run --rm -v $(pwd)/web/app:/app composer update --ignore-platform-reqs
the libs of php are all installed in docker container, just can not be detected by phpoffice/spreadsheets package, so just add '--ignore-platform-reqs' to ignore it.
it also works for #28
@mikevolmar