doulang1945 2014-09-23 12:15
浏览 96
已采纳

无法通过composer安装Azure SDK for PHP

I am trying to install the Azure SDK for PHP on an Azure Website using the composer method outlines in http://azure.microsoft.com/en-us/documentation/articles/php-download-sdk/, but the composer installation has failed every time when it gets to "- Installing microsoft/windowsazure (dev-master 97e77ce)".

This is what happens every time:

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] 

My composer.json file:

{
"require": {
    "microsoft/windowsazure": "*"
},          
"repositories": [
    {
        "type": "pear",
        "url": "http://pear.php.net"
    }
],
"minimum-stability": "dev"
}

Does anyone know what the problem is?

  • 写回答

1条回答 默认 最新

  • doufu6504 2014-10-09 06:42
    关注

    Managed to fix it.
    Method:

    First installed the dependencies with this 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" : "*"
        }
    }
    

    Then modified the composer.json to:

    {
        "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"
        }
    }
    

    And ran composer update.
    It now works.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突