Symfony installieren Sie fehlende Hersteller-Bibliotheken
Ich habe eine frische Installation von Symfony mit alles suchen, in-place-abgesehen von meinem Anbieter-Verzeichnis leer ist? Das heißt, es hat
Komponist und Lehre Verzeichnisse, aber Sie sind leer. Wenn ich stand in meinem root an, und führen Sie den Befehl:
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing doctrine/lexer (v1.0.1)
Downloading: 100%
Failed to download doctrine/lexer from dist: Could not decompress the archive, enable the PHP zip extension.
The php.ini used by your command-line PHP is: /etc/php5/php.ini
Now trying to download from source
- Installing doctrine/lexer (v1.0.1)
Cloning 83893c552fd2045dd78aef794c31e694c37c0b8c
[RuntimeException]
Failed to clone git@github.com:doctrine/lexer.git via git, https, ssh protocols, aborting.
- git://github.com/doctrine/lexer.git
Cloning into '/cygdrive/c/Apache24/htdocs/symfony.local/vendor/doctrine/lexer'...
fatal: remote composer already exists.
- https://github.com/doctrine/lexer.git
fatal: destination path '/cygdrive/c/Apache24/htdocs/symfony.local/vendor/doctrine/lexer' already exists and is not an empty directory.
- git@github.com:doctrine/lexer.git
fatal: destination path '/cygdrive/c/Apache24/htdocs/symfony.local/vendor/doctrine/lexer' already exists and is not an empty directory.
Auf dem front-end durchsuchen, um http://symfony.local/web/
Warning: require(C:\Apache24\htdocs\symfony.local\app/../vendor/autoload.php): failed to open stream: No such file or directory in C:\Apache24\htdocs\symfony.local\app\autoload.php on line 11
Fatal error: require(): Failed opening required 'C:\Apache24\htdocs\symfony.local\app/../vendor/autoload.php' (include_path='.;c:\php\includes') in C:\Apache24\htdocs\symfony.local\app\autoload.php on line 11
Klar, es ist auf der Suche für /vendor/autoload.php
aber das ist es nicht. Warum ist mein Anbieter-Verzeichnis leer und wie kann ich sicher gehen, dass die Bibliotheken installiert bekommen?
$ composer update
gibt:
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing paragonie/random_compat (1.1.4)
Downloading: 100%
Failed to download paragonie/random_compat from dist: Could not decompress the archive, enable the PHP zip extension.
The php.ini used by your command-line PHP is: /etc/php5/php.ini
Now trying to download from source
- Installing paragonie/random_compat (1.1.4)
Cloning d762ee5b099a29044603cd4649851e81aa66cb47
[RuntimeException]
Failed to clone git@github.com:paragonie/random_compat.git via git, https, ssh protocols, aborting.
- git://github.com/paragonie/random_compat.git
Cloning into '/cygdrive/c/Apache24/htdocs/symfony.local/vendor/paragonie/random_compat'...
fatal: remote composer already exists.
- https://github.com/paragonie/random_compat.git
fatal: destination path '/cygdrive/c/Apache24/htdocs/symfony.local/vendor/paragonie/random_compat' already exists and is not an empty directory.
- git@github.com:paragonie/random_compat.git
fatal: destination path '/cygdrive/c/Apache24/htdocs/symfony.local/vendor/paragonie/random_compat' already exists and is not an empty directory.
Du musst angemeldet sein, um einen Kommentar abzugeben.
Gut, PHP ist nicht richtig konfiguriert.
Passen Sie Ihre
/etc/php5/php.ini
und aktivieren Sie die "ZIP" - Erweiterung.Und der rest ist wohl ein Berechtigungsproblem, denn Sie sind mit Cygwin in Kombination mit dem Komponisten. Komponist und Cygwin sind nicht wirklich die besten Freunde.
Mein Vorschlag: führen Komponist auf die native Windows-CLI, nur für den Verkäufer, abholen Teil.
composer update
. So, Cygwin-das problem war. Ich un-kommentiertextension=php_zip.dll
imphp.ini
auch. Vielen Dank Jensextension=php_zip.dll
in meinem/etc/php/7.0/cli/php.ini
. Sollte Schreibe ich diese Zeile?sudo apt-get install php7.0-unzip
Was Sie wollen, ist
composer update
. Es Lesencomposer.json
zum installieren der erforderlichen Pakete.composer install
ist für die Bereitstellung verwendet.Herunterladen und aktivieren Sie die zip-extension für PHP
Wenn Sie mit PHP7.0 und verwenden Sie ein debian-Basis-distribution (Z.B. Ubuntu), verwenden Sie die folgenden installieren und aktivieren es automatisch