2017-11-02 3 views
0

Wenn ich versuche, Laravel bekommen zu installieren, gibt es mir eine Fehlermeldung in der unterLaravel Installation Fehler: Fehlende PHP-Erweiterung

composer global require "laravel/installer"

Fehler:

Problem 1 
    - laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system. 
    - laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system. 
    - Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1]. 

    To enable extensions, verify that they are enabled in your .ini files: 
    - /etc/php/7.1/cli/php.ini 
    - /etc/php/7.1/cli/conf.d/10-opcache.ini 
    - /etc/php/7.1/cli/conf.d/10-pdo.ini 
    - /etc/php/7.1/cli/conf.d/20-calendar.ini 
    - /etc/php/7.1/cli/conf.d/20-ctype.ini 
    - /etc/php/7.1/cli/conf.d/20-exif.ini 
    - /etc/php/7.1/cli/conf.d/20-fileinfo.ini 
    - /etc/php/7.1/cli/conf.d/20-ftp.ini 
    - /etc/php/7.1/cli/conf.d/20-gettext.ini 
    - /etc/php/7.1/cli/conf.d/20-iconv.ini 
    - /etc/php/7.1/cli/conf.d/20-json.ini 
    - /etc/php/7.1/cli/conf.d/20-mbstring.ini 
    - /etc/php/7.1/cli/conf.d/20-phar.ini 
    - /etc/php/7.1/cli/conf.d/20-php-remctl.ini 
    - /etc/php/7.1/cli/conf.d/20-posix.ini 
    - /etc/php/7.1/cli/conf.d/20-readline.ini 
    - /etc/php/7.1/cli/conf.d/20-shmop.ini 
    - /etc/php/7.1/cli/conf.d/20-sockets.ini 
    - /etc/php/7.1/cli/conf.d/20-sysvmsg.ini 
    - /etc/php/7.1/cli/conf.d/20-sysvsem.ini 
    - /etc/php/7.1/cli/conf.d/20-sysvshm.ini 
    - /etc/php/7.1/cli/conf.d/20-tokenizer.ini 
    You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. 

Installation failed, reverting ./composer.json to its original content. 

Ich bin mit Ubuntu 17.10: Wie kann diesen Fehler beheben? Ich habe versucht, die PHP-Pakete zu installieren, aber immer noch dasselbe ..

+0

'sudo apt-get install php-zip' – Philipp

+0

Es auszuführen sagt es die Zip-Erweiterung benötigt. Das wird von 'phpX-zip' bereitgestellt, wo X deine Version ist – apokryfos

+0

@Philipp es funktioniert, danke –

Antwort

1
Problem 1 
    - laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system. 
    - laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system. 
    - Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1]. 

Komponist sagt Ihnen, dass eine fehlende Erweiterung den Prozess blockiert.

Versuchen sudo apt-get php7.0-zip (oder 7.1)

-1

Versuchen Sie folgendes:

sudo apt-get install php-zip 

oder

sudo apt-get install php5.6-zip 

Starten Sie anschließend Apache/nginx

+1

Der Autor verwendet PHP 7, nicht 5. Und er sollte php-fpm, nicht den Web-Server – Ryosaku

+0

@Ryosaku wenn er neu starten Autor PHP als CGI-Modul ausführen, er muss Apache neu starten und nicht PHP-Fpm - aber das ist nicht Teil der Frage/Lösung – Philipp

+0

Ja, du hast Recht, mein Schlechter – Ryosaku