I\'m trying to install laravel installer with the composer on my Ubuntu PC, but I get this error during the installation. `Your requirements could not be resolved to an inst
For PHP 7.2 in Ubuntu 18.04 LTS
sudo apt-get install php7.2-zip
Works like a charm
For Mac with Macports,
# port install php71-zip
to know your php version
php -v
for php 7.3.0
sudo apt-get install php7.3-zip
If you're facing this issue with macOS Catalina, I recommend these steps:
Install Homebrew (if you haven't already done so): head over to brew.sh or simply run this command: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run brew install php@7.3
Update your $PATH variable to include the newly installed version of php:
echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/php@7.3/sbin:$PATH"' >> ~/.zshrc
Reload your shell preferences script $ source ~/.zshrc
or source ~/.bashrc
Finally, install laravel: composer global require laravel/installer
On centos 7 I have used:
yum install php-pecl-zip
because any other solution didn't work for me.
V=`php -v | sed -e '/^PHP/!d' -e 's/.* \([0-9]\+\.[0-9]\+\).*$/\1/'` \
sudo apt-get install php$V-zip