简体   繁体   English

即使最新版本在packagist上可用,Composer create-project也无法正常工作,但是composer install适用于同一个项目

[英]Composer create-project is not working even though latest release is available on packagist, but composer install works for same project

UPDATED : It's working on Ubuntu but not on Windows, is there installation problem with Composer ? 更新它在Ubuntu上运行但在Windows上运行,是否存在Composer的安装问题?

Package: https://packagist.org/packages/chetan85/yii2-app-advanced-for-shared-hosting 包: https//packagist.org/packages/chetan85/yii2-app-advanced-for-shared-hosting

Command: php composer.phar create-project chetan85/yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2 命令: php composer.phar create-project chetan85/yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2

Error: 错误: 在此输入图像描述

Same is happening with yii2-advanced app installation: yii2-advanced app安装也是如此: 在此输入图像描述 在此输入图像描述

BUT: all the update and install command are working fine. 但是:所有更新和安装命令都正常工作。 If we downdload .zip file from: https://github.com/chetan85/yii2-app-advanced-for-shared-hosting/releases/tag/2.0.11.2 如果我们下载.zip文件: https//github.com/chetan85/yii2-app-advanced-for-shared-hosting/releases/tag/2.0.11.2

and do php ../composer.phar install It works perfectly fine. 并做php ../composer.phar install它工作得很好。 在此输入图像描述

Can try this php composer.phar create-project chetan85/yii2-app-advanced-for-shared-hosting test_shared 可以尝试这个php composer.phar创建项目chetan85 / yii2-app-advanced-for-shared-hosting test_shared

also check if composer is installed globally try with php composer create-project chetan85/yii2-app-advanced-for-shared-hosting test_shared 还检查是否全局安装了composer尝试使用php composer create-project chetan85 / yii2-app-advanced-for-shared-hosting test_shared

@All, The problem here was command ie Old command @All,这里的问题是命令即旧命令

php composer.phar create-project chetan85/yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2 php composer.phar create-project chetan85 / yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2

New Command 新命令

./composer.phar create-project chetan85/yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2 ./composer.phar create-project chetan85 / yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2

We SHOULD NOT be using PHP in command ie 我们不应该在命令中使用PHP,即

php composer.phar create-project chetan85/yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2 php composer.phar create-project chetan85 / yii2-app-advanced-for-shared-hosting test_shared 2.0.11.2

Then everything works fine. 一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM