最近用drupal做开发,想用一下console
按照官方提示的地址:https://hechoendrupal.gitbooks.io/drupal-console/content/zh_hans/getting/installer.html
安装完成后,到相应的网站目录执行drupal init 时提示要用以下两条命令执行composer安装
[ERROR] Drupal Console is not installed at:
You must execute the following composer commands:
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
composer update drupal/console --with-dependencies
sudo第一条后,出现以下错误
Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
[Composer\Downloader\TransportException]
Your configuration does not allow connection to http://packagist.org. See h
ttps://getcomposer.org/doc/06-config.md#secure-http for details.
百度找了好多,都是说用composer update就行!结果都扯蛋没用!
后来找到了解决方案:
sudo composer config -g repo.packagist composer https://packagist.phpcomposer.com
来源:http://blog.csdn.net/worldzhy/article/details/54927806
问题主要原因:是composer的源没有相应的zlib_docode,更新一个composer源就好!