Can't install laravel installer via composer

It says that it requires zip extension

laravel/installer v1.4.0 requires ext-zip...

Install using (to install the default version):

sudo apt install php-zip

Or, if you're running a specific version of PHP:

# For php v7.0
sudo apt-get install php7.0-zip

# For php v7.1
sudo apt-get install php7.1-zip

# For php v7.2
sudo apt-get install php7.2-zip

# For php v7.3
sudo apt-get install php7.3-zip

# For php v7.4
sudo apt-get install php7.4-zip

FOR MAC USERS with CATALINA

First, install homebrew. Then, say

brew install [email protected]
brew link [email protected]

restart the console and run the laravel installer


On centos 7 I have used:

yum install php-pecl-zip

because any other solution didn't work for me.