「あなたの要件は、パッケージのインストールセットに解決することができませんでした」のエラーを与える:Composerは、ホームステッドを使用してインストールし、私は次のコマンドを使用して、私の作曲のパッケージをインストールしようとしています
composer install --no-dev --no-scripts
composer.json
ファイルはこのようになります(それは)標準Laravelの作曲ファイルに非常によく似ています:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"doctrine/dbal": "^2.5",
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*",
"laravel/homestead": "^5.2",
"barryvdh/laravel-ide-helper": "^2.3"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
しかし、私は、私は次のエラーを取得するバージョンv5.5.9
上でPHPを実行している私の生産機械(上でそれをインストールしようとすると:
お客様の要件は、インストール可能なパッケージのセットでは解決できませんでした。
Problem 1
- laravel/homestead v5.4.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead v5.3.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead v5.3.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead v5.3.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead v5.2.4 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead v5.2.1 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead v5.2.0 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead 5.2.3 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- laravel/homestead 5.2.2 requires php ^5.6 || ^7.0 -> your PHP version (5.5.9) does not satisfy that requirement.
- Installation request for laravel/homestead ^5.2 -> satisfiable by laravel/homestead[5.2.2, 5.2.3, v5.2.0, v5.2.1, v5.2.4, v5.3.0, v5.3.1, v5.3.2, v5.4.0].
次のようにだから私の質問は以下のとおりです。
- 私は
--no-dev
と家産がdevパッケージであるとき屋敷にもインストールされているのはなぜ? - 生産マシンにHomesteadをインストールしたい場合は、どうすれば上記の問題を解決できますか?
私はdevの依存関係はインストールしないでください。ではなぜですか?私はそれがなぜ必要な理由もなく、 '--no-scripts'を追加しました –
私は全く同じ' composer.json'を使ってテストし、dev依存関係をインストールしませんでした。あなたはdevマシンでもこのエラーが出ますか? – ayip
私はdevの上でPHPのそれ以降のバージョンを使用しているので、devマシンではありません。 –