2013-12-14 110 views
3

當我要使用像self-update任何commad每次,installupdate作曲家生成此錯誤:問題用作曲家的PHP

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

與作曲家安裝我得到這個錯誤:

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

}

+0

你能粘貼您的composer.json文件 –

+0

看來,我不能做任何事情https://getcomposer.org/我的PHP是'openssl'使我'PHP檢查它-m'有是一個'openssl'擴展名,我該怎麼辦? –

+1

你可以用sudo嘗試一樣的命令! –

回答

0

使用HTTP作爲一種解決方法。

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