donglang9880 2015-12-15 16:57
浏览 153
已采纳

Symfony安装缺少的供应商库

I have a fresh install of Symfony with everthing looking in-place apart from my vendors directory is empty? That is, it has composer and doctrine directories in it but they are empty. If I stand in my root and run the command:

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

At the front end browsing to 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

Clearly it's looking for /vendor/autoload.php but this isn't there. Why is my vendor directory empty and how can I ensure the libraries get installed?

$ composer update returns:

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.
  • 写回答

3条回答 默认 最新

  • douyi1197 2015-12-15 17:01
    关注

    Well, your PHP is not properly configured.

    Adjust your /etc/php5/php.ini and enable the "ZIP" extension.

    And the rest is probably a permissions issue, because you are using Cygwin in combination with Composer. Composer and Cygwin are not really best friends.

    My suggestion: run Composer on the native Windows CLI, just for the vendor fetching part.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用