Composer - The zip extension and unzip command are both missing

By xngo on November 16, 2020

Issue

I was install php-image-resize library using composer and got the following error message:

composer require gumlet/php-image-resize
Failed to download gumlet/php-image-resize from dist: The zip extension and unzip command are both missing, skipping.

Solution

From the error message, php-zip package is missing. So, I installed it using the following command.

apt-get install -y php-zip

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.