使用composer php的问题



每当我想使用任何命令(如self-updateinstallupdate)时,composer都会生成以下错误:

[ComposerDownloaderTransportException]                                                   
The "https://getcomposer.org/version" file could not be downloaded: Failed to enable crypto                                                                                         
failed to open stream: operation failed

使用composer安装,我得到这个错误:

The "https://packagist.org/packages.json" file could not be downloaded: Failed to enable crypto
failed to open stream: operation failed
https://packagist.org could not be fully loaded, package information was loaded from the local cache   and may be out of date

我使用的是php 5.4.9版本,我的操作系统是ubuntu 13.04,我的composer版本是:

Composer version 80499bb02418711b34bba59c1a6d8032429e5702 2013-12-06 12:32:19

这快把我逼疯了,请帮帮我!

这是laravel:的典型composer.json文件

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
    "laravel/framework": "4.0.*"
},
"require-dev": {
    "way/guard-laravel": "dev-master"
},
"autoload": {
    "classmap": [
        "app/commands",
        "app/controllers",
        "app/models",
        "app/database/migrations",
        "app/database/seeds",
        "app/tests/TestCase.php"
    ]
},
"scripts": {
    "post-install-cmd": [
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist"
},
"minimum-stability": "dev"

}

使用http作为解决方法。

{
    "packagist": false
},
{
    "type": "composer",
    "url": "http://packagist.org",
    "options": {
        "ssl": {
            "verify_peer": "false"
        }
    }
}

相关内容

  • 没有找到相关文章

最新更新