欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

windows下用composer安装laravel出错

程序员文章站 2022-05-22 10:25:27
...
windows xp系统
php环境为phpstudy Apache+php5.4
composer版本为1.0-dev (c557715669ba8dd2dc6c63859f919351a4aa5e2f)

使用命令 composer global require "laravel/installer=~1.1"

报错:PHP Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Vers
ion\VersionParser::parseLinks() in C:\Documents and Settings\Administrator\Appli
cation Data\Composer\vendor\fxp\composer-asset-plugin\Repository\VcsPackageFilte
r.php on line 272

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

请问如何解决,另外,系统环境PATH中以添加C:\Documents and Settings\Administrator\Application Data\Composer\vendor\fxp和C:\Documents and Settings\Administrator\Application Data\Composer\vendor\bin

回复内容:

windows xp系统
php环境为phpstudy Apache+php5.4
composer版本为1.0-dev (c557715669ba8dd2dc6c63859f919351a4aa5e2f)

使用命令 composer global require "laravel/installer=~1.1"

报错:PHP Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Vers
ion\VersionParser::parseLinks() in C:\Documents and Settings\Administrator\Appli
cation Data\Composer\vendor\fxp\composer-asset-plugin\Repository\VcsPackageFilte
r.php on line 272

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

请问如何解决,另外,系统环境PATH中以添加C:\Documents and Settings\Administrator\Application Data\Composer\vendor\fxp和C:\Documents and Settings\Administrator\Application Data\Composer\vendor\bin

composer重装吧,用stable的版本,windows最好用https://getcomposer.org/Composer-Setup.exe,不用设置环境变量之类的,还集成在exploer

这里有现成的最新版,下载就可以用。
https://github.com/rainwsy/Laravel5

composer建议用*安装吧.