我正在尝试使用http://azure.microsoft.com/en-us/documentation/articles/php-download-sdk/中的编写器方法概述在Azure网站上安装Azure SDK for PHP,但是每次进入&#34时,编写器安装都失败了 - 安装microsoft / windowsazure (dev-master 97e77ce)"。
每次都会发生这种情况:
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Installing dependencies (including require-dev)
- Installing microsoft/windowsazure (dev-master 97e77ce)
Cloning 97e77ce744ecc2d3d9584b4df6982dc836489faf
Failed to download microsoft/windowsazure from source: Unable to kill the process
Now trying to download from dist
- Installing microsoft/windowsazure (dev-master 97e77ce)
Downloading: connection...
[Composer\Downloader\TransportException] The "https://api.github.com/repos/WindowsAzure/azure-sdk-for-php/zipball/97e77ce744ecc2d3d9584b4df6982dc836489faf" file could not be downloaded (HTTP/1.1 404 Not Found) install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
我的composer.json文件:
{
"require": {
"microsoft/windowsazure": "*"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
"minimum-stability": "dev"
}
有谁知道问题是什么?
答案 0 :(得分:1)
管理修复它。
方法强>
首先使用此composer.json安装依赖项:
{
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
"require": {
"pear-pear.php.net/mail_mime" : "*",
"pear-pear.php.net/http_request2" : "*",
"pear-pear.php.net/mail_mimedecode" : "*"
}
}
然后将composer.json修改为:
{
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
},
{
"type": "vcs",
"url": "https://github.com/Azure/azure-sdk-for-php"
}
],
"require": {
"pear-pear.php.net/mail_mime" : "*",
"pear-pear.php.net/http_request2" : "*",
"pear-pear.php.net/mail_mimedecode" : "*",
"microsoft/windowsazure" : "0.4.0"
}
}
然后跑composer update
它现在有效。