windows下 composer常见错误及处理。

来源:互联网 发布:网络调查问卷茶叶 编辑:程序博客网 时间:2024/05/04 11:04
windows下 composer常见错误及处理。
错误一:
Warning: This development build of composer is over 30 days old. It is recommend
ed to update it by running "C:\ProgramDat\ComposerSetup\bin\composer.phar self-update" to get the latest version.
解决方法:
composer selfupdate

错误二:
You are running composer with xdebug enabled. This has a major impact on runtime
performance. See https://getcomposer.org/xdebug
解决方法:
打开PHP.ini,在zend_extension前加分号
;zend_extension="d:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll"

错误三:
Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\ VersionParser::parseLinks() in C:\Documents and Settings\Administrator\Application Data\Composer\vendor\fxp\composer-asset-plugin\Repository\VcsPackageFilter.php on line 272

解决办法:
删除composer资源插件,再重新安装
Linux : rm -rf ~/.composer/vendor/fxp
Windows : rm -r %APPDATA%\Composer\vendor\fxp
重新安装:
composer global require "fxp/composer-asset-plugin:~1.0.3"
如果还有其它错误,可尝试全局更新:
composer global update

错误四:
[Composer\Downloader\TransportException]
Your configuration does not allow connection to http://ooxx/xxoo.git. See https://getcomposer.org/doc/06-config.md#secure-http for details.

解决方法是设置一个本地或全局的composer配置:
composer config secure-http false
全局设置:
composer config -g secure-http false
意义是默认禁用https请求,就可以了

错误五:
[Composer\Excepion\NoSslException]

The openssl extension is required for SSL/TLS protection but is not availab le. If you can not enable the openssl extension, you can disable this error , at your own risk, by setting the '...

解决方法

把php的ssl开启
composer config -g -- disable-tls true

错误六
[RuntimeException]
You must enable the openssl extension in your php.ini to load information from https://packagist.phpcomposer.com
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-pa
ckages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
解决方法
php.ini OpenSSL扩展打开
extension=php_openssl.dll
1 0
原创粉丝点击