0
我只是創建了一個文件夾,並在其中創建了一個名爲「composer.json」的文件。在那裏我寫了下面的代碼。在composer.json中獲取包括PHP和AWS的錯誤
{
"require": {
"php": ">=5.5.11",
"aws/aws-sdk-php": "2.*"
}
}
當我點擊下面的命令。
curl -sS https://getcomposer.org/installer | php
php composer.phar install
我得到的輸出如下
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package php could not be found in any version, there may be a typo in the package name. Problem 2
- The requested package php could not be found in any version, there may be a typo in the package name. Problem 3
- aws/aws-sdk-php 2.6.6 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.6.5 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.6.4 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.6.3 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.6.2 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.6.1 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.6.0 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.5.4 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.5.3 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.5.2 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.5.1 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.5.0 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.9 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.8 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.7 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.6 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.5 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.4 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.3 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.2 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.12 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.11 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.10 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.1 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.4.0 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.3.4 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.3.3 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.3.2 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.3.1 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.3.0 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.2.1 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.2.0 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.1.2 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.1.1 requires php >=5.3.3 -> no matching package found.
- aws/aws-sdk-php 2.1.0 requires php >=5.3.2 -> no matching package found.
- aws/aws-sdk-php 2.0.3 requires php >=5.3.2 -> no matching package found.
- aws/aws-sdk-php 2.0.2 requires php >=5.3.2 -> no matching package found.
- aws/aws-sdk-php 2.0.1 requires php >=5.3.2 -> no matching package found.
- aws/aws-sdk-php 2.0.0 requires php >=5.3.2 -> no matching package found.
- aws/aws-sdk-php 2.6.6 requires php >=5.3.3 -> no matching package found.
- Installation request for aws/aws-sdk-php 2.* -> satisfiable by aws/aws-sdk-php[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2,
2.2.0, 2.2.1, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.10, 2.4.11, 2.4.12, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.6.6].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
但是,當我從composer.json刪除任何一個PHP版本或AWS SDK,打以下命令,它工作正常。沒有得到什麼問題。
php composer.phar update
我在MAC系統上。
PHP的版本是您使用? –
您的PHP版本實際上是否是'> = 5.5.11'?另外,對於AWS開發工具包,請嘗試使用'〜2.6.0'而不是通配符表達式。有時我使用通配符遇到問題。 –
Alexandru G> PHP版本5.5.11。 –