Host OS: Windows10 home Guest OS: WSL2 Ubuntu 20.04 php7.4.7
When I run composer global require laravel / installer, I get the following error:
Problem 1
- Installation request for laravel/installer ^3.1 -> satisfiable by laravel/installer[v3.1.0].
- laravel/installer v3.1.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
Apparently the php module zip is not installed. But zip is already installed
which zip
/usr/bin/zip
I thought ... but I didn't specify the version when installing the module.
Therefore, specify the version and install again.
sudo apt install php7.4-zip
Check if the module has been added
php -m
[PHP Modules]
bcmath
.
.
(abridgement)
.
.
zip
zlib
It is installed without any problem. When the command was executed again in this state, it could be executed without any problem.
Don't forget to specify the version when installing the php module.
Recommended Posts