2016-05-19 5 views
2

laravelプロジェクト用のcomposer installを実行しようとしています。 エラーは以下の通りである:私はそれに見えたlaravel composer installはtymon/jwt-auth用のインストール可能なパッケージを解決できませんでした

Loading composer repositories with package information 
Installing dependencies (including require-dev) from lock file 
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. 
Your requirements could not be resolved to an installable set of packages. 

    Problem 1 
    - Installation request for namshi/jose 5.0.2 -> satisfiable by namshi/jose[5.0.2]. 
    - namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it. 
    Problem 2 
    - namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it. 
    - tymon/jwt-auth 0.5.9 requires namshi/jose 5.0.* -> satisfiable by namshi/jose[5.0.2]. 
    - Installation request for tymon/jwt-auth 0.5.9 -> satisfiable by tymon/jwt-auth[0.5.9]. 

、私のMacでのPHPには、OpenSSLを持っていないようです。 しかし、私は

php -m 

を実行すると、リスト内のopensslのモジュールがあります。

したがって、私は問題が何かを理解していません。ここで

は私composer.jsonある

{ 
"name": "laravel/laravel", 
"description": "The Laravel Framework.", 
"keywords": ["framework", "laravel"], 
"license": "MIT", 
"type": "project", 
"require": { 
    "php": ">=5.5.9", 
    "laravel/framework": "5.1.*", 
    "tymon/jwt-auth": "0.5.*", 
    "barryvdh/laravel-ide-helper": "^2.1", 
    "fzaninotto/faker": "~1.4", 
    "zizaco/entrust": "~2.0" 
}, 
"require-dev": { 

    "mockery/mockery": "0.9.*", 
    "phpunit/phpunit": "~4.0", 
    "phpspec/phpspec": "~2.1" 
}, 
"autoload": { 
    "classmap": [ 
     "database", 
     "app/Services" 

    ], 
    "psr-4": { 
     "App\\": "app/" 
    } 
}, 
"autoload-dev": { 
    "classmap": [ 
     "tests/TestCase.php" 
    ] 
}, 
"scripts": { 
    "post-install-cmd": [ 
     "php artisan clear-compiled", 
     "php artisan optimize" 
    ], 
    "pre-update-cmd": [ 
     "php artisan clear-compiled" 
    ], 
    "post-update-cmd": [ 
     "php artisan optimize" 
    ], 
    "post-root-package-install": [ 
     "php -r \"copy('.env.example', '.env');\"" 
    ], 
    "post-create-project-cmd": [ 
     "php artisan key:generate" 
    ] 
}, 
"config": { 
    "preferred-install": "dist" 
} 

}

PS: 私はブランドの新しいMac Proは、MAMPとXcodeをインストールするための時間を持っていないてしまったので、私はPHPを推測私は内部で使用されています

+0

'のphpinfo()'と小さなPHPスクリプトを作成してみてくださいとOpenSSLがあるかどうかを確認。 – user3158900

答えて

1

検索と数時間の試した後、私はこの問題を解決するために私の道を作った。 問題は、私のMacBookが新しいものであり、設定が全くないため、PHPで構築されたPHPを含むすべての設定がデフォルトであるためです。

MAMPをインストールしたら、ビルドしたphpをMAMP phpにリンクすると、問題は解決されます。

PHPに組み込まれているのは基本モジュールだけなので、MAMPのPHPと互換性がありません。

how to link to MAMP PHPについては、この記事を参照してください。

+0

作曲家の更新をしようとすると、これは私にとってはうまくいかなかった。私はちょうどエルキャピタンにアップグレードし、この問題にヒットしました。 VagrantとLaravel Homesteadに行きました - すべてが期待通りに機能します –

+0

私はHomesteadを使用していますが、まだこの問題を抱えています。問題は、Homesteadではなく、* host *マシンでコンポーザーを使用していたことです。 – damd

2

は解決:

は、OpenSSL、問題を解決します5.6+カール、自作とPHPをインストールします。

のMac端末コマンド:

brew install homebrew/php/php56 --with-homebrew-curl --with-openssl

composer require tymon/jwt-auth:0.5.*

関連する問題