当前位置:  开发笔记 > 编程语言 > 正文

Symfony安装缺少的供应商库

如何解决《Symfony安装缺少的供应商库》经验,为你挑选了1个好方法。

我有一个全新的Symfony安装,除了我的供应商目录是空的外看的地方?也就是说,它有作曲家和教条目录,但它们都是空的.如果我站在我的根目录并运行命令:

$ 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.

在前端浏览 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

显然它正在寻找,/vendor/autoload.php但这不存在.为什么我的供应商目录为空,我如何确保安装库?

$ composer update 收益:

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.

Jens A. Koch.. 5

好吧,你的PHP没有正确配置.

调整/etc/php5/php.ini并启用"ZIP"扩展名.

其余的可能是权限问题,因为您将Cygwin与Composer结合使用.Composer和Cygwin并不是最好的朋友.

我的建议:在本机Windows CLI上运行Composer,仅用于供应商提取部分.



1> Jens A. Koch..:

好吧,你的PHP没有正确配置.

调整/etc/php5/php.ini并启用"ZIP"扩展名.

其余的可能是权限问题,因为您将Cygwin与Composer结合使用.Composer和Cygwin并不是最好的朋友.

我的建议:在本机Windows CLI上运行Composer,仅用于供应商提取部分.

推荐阅读
ERIK又
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有