首页 > 后端开发 > php教程 > Mac下安装composer后不能安传composerAsset

Mac下安装composer后不能安传composerAsset

WBOY
发布: 2016-06-06 20:20:02
原创
1164 人浏览过

先上码如下。

<code>➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.0"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270
➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.4-bata"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270
</code>
登录后复制
登录后复制

刚开始安装composerAsset 1.0.0版本的时候没问题,后安装1.0.4-bata版本后成功后,我将composer进行了全局安装,但是再执行这个就报上面的错误,搜索了不少资料,但是貌似都没用,删除composer.phar后,重新全局安装,还是没有变化,错误如初,所以只能求指点。

回复内容:

先上码如下。

<code>➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.0"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270
➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.4-bata"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270
</code>
登录后复制
登录后复制

刚开始安装composerAsset 1.0.0版本的时候没问题,后安装1.0.4-bata版本后成功后,我将composer进行了全局安装,但是再执行这个就报上面的错误,搜索了不少资料,但是貌似都没用,删除composer.phar后,重新全局安装,还是没有变化,错误如初,所以只能求指点。

https://github.com/francoispluchino/composer-asset-plugin/pull/133

  • Linux : rm -rf ~/.composer/vendor/fxp

  • Windows : rm -r%APPDATA%\Composer\vendor\fxp

  • composer global require "fxp/composer-asset-plugin:~1.1.1"

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板