laravel RuntimeException 未安装 Zip PHP 扩展
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36511044/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
RuntimeException The Zip PHP extension is not installed
提问by Amjad
I'm a newbie in Linux I just installed composer and laravel...
我是 Linux 新手,我刚刚安装了 composer 和 laravel ......
but when i run the laravel new projecti get the following error:
但是当我运行时,laravel new project我收到以下错误:
[RuntimeException]
The Zip PHP extension is not installed. Please install it and try again.
I don't know how to install that extension...
我不知道如何安装该扩展...
please help
请帮忙
回答by Devin Norgarb
Try type into the command line:
尝试在命令行中输入:
sudo apt-get install php7.0-zip
sudo apt-get install php7.0-zip
Verify from any route with:
从任何路线验证:
dd(get_loaded_extensions());
dd(get_loaded_extensions());
This worked for me, good luck.
这对我有用,祝你好运。
回答by Harry
for php 7.0
对于 php 7.0
sudo apt-get install php7.0-zip
for php 7.1
对于 php 7.1
sudo apt-get install php7.1-zip
and so on!
等等!
回答by Robert Odoch
I got the same issue and tried to install the extension with the command sudo apt install php7.0-zipbut still got the same error. I finally solved it with sudo apt install php-zip
我遇到了同样的问题并尝试使用该命令安装扩展程序,sudo apt install php7.0-zip但仍然遇到相同的错误。我终于解决了sudo apt install php-zip
回答by Aryeh Beitz
I was using php7.0-zts.
The solution was to uninstall all the ZTSpackages and revert to the regular php7.0packages.
我正在使用php7.0-zts.
解决方案是卸载所有ZTS软件包并恢复到常规php7.0软件包。
回答by Gracias Peterson Claude
This is outdate using brew doctor and brew cleanup. Brew doctor will give you some fixes that will help you install laravel.
使用 brew doctor 和 brew cleanup 已经过时了。Brew Doctor 会为您提供一些帮助您安装 Laravel 的修复程序。
composer global require laravel/installer\n && brew install php
composer global require laravel/installer\n && brew install php

