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:\ProgramData\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"

见文档:

https://getcomposer.org/doc/articles/troubleshooting.md#xdebug-impact-on-composer

错误三:

Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\V
ersionParser::parseLinks() in C:\Documents and Settings\Administrator\Applicatio
n 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

见参考:

http://stackoverflow.com/questions/32901750/why-do-i-get-php-fatal-error-when-i-want-to-install-an-extension

windows截图如下:

更多信息参考:

composer 中文网:http://www.phpcomposer.com/

composer官网:https://getcomposer.org/doc/

  • 4
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值