简体   繁体   中英

Composer does not recognize the extension php-zip

I have a problem with composer while i try to create new project by:

laravel new blog

After run this command composer says:

  [RuntimeException] The Zip PHP extension is not installed. Please install it and try again.

I installed php7.1-zip, zip, unzip, php-zip and it's still not working. My OS is Debian 9 and i have installed php7.1 and php7.1-zip. Do you have any idea to solve this problem?

Try this command:

sudo apt-get install php7.1-zip

If you see that it does not work, try to restart your machine.

Create an info.php file in your web root containing <?php phpinfo(); ?> <?php phpinfo(); ?>

Then load that file in a browser.

It's possible your Apache isn't configured to use the install of PHP that you're expecting. phpinfo() will show you which version of PHP it's loading, where the loaded php.ini is located, which extensions are enabled, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM