windows下 composer常见错误及处理。

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
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黑漆#000000

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值