无法在Mac上安装Yii框架高级模板


Can't Install Yii Framework Advanced Template on Mac

我是Yii框架的新手,我已经在我的个人mac电脑上安装了它。问题是我不能在办公室的mac电脑上安装它。

奇怪的是,我遵循与mac相同的所有步骤,但当我尝试下载基本或高级模板时,它失败了,出现以下错误:

[Composer'Downloader'TransportException]                                     
The "http://packagist.org/p/provider-2013$7ae7b77e72316138c9190d26b27e698e9efe24373bdb5d1a968679f5cca0  
e597.json" file could not be downloaded (HTTP/1.1 400 Bad Request)  

当我运行"sudo composer self-update"时,它显示

You are already using composer version 9f6fdfd703f433bd0777fd89fb4684908a6c4f06.

和运行作曲家诊断告诉我:

Checking composer.json: FAIL
require.yiisoft/yii2 : unbound version constraints (>=2.0.6) should be avoided
require.yiisoft/yii2-bootstrap : unbound version constraints (*) should be avoided
require.yiisoft/yii2-swiftmailer : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer'Downloader'TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK

我也不能安装编写器资产堵塞。当运行该命令时,它告诉我与尝试下载模板时相同的[传输异常]。

老实说,我到处都找遍了,找不到解决这个问题的办法。提前感谢。

好了,这个错误现在应该消失了…我只是等到第二天,我试着用

 sudo composer self-update

,它神奇地更新了,我可以使用它了。不知道是什么原因导致这个失败,但它现在工作正常。