2017-12-18 13 views
-1

프로젝트에 composer install을 실행하려고 할 때 오류가 있습니다. 이 같은 발행 오류 :composer install - 설치 가능한 패키지 세트로 요구 사항을 해결할 수 없습니다.

[email protected]:~/Triplogic/tripologic-admin-laravel$ sudo composer install 
Loading composer repositories with package information 
Installing dependencies (including require-dev) from lock file 
Your requirements could not be resolved to an installable set of packages. 

    Problem 1 
    - Installation request for symfony/event-dispatcher v4.0.1 -> satisfiable by symfony/event-dispatcher[v4.0.1]. 
    - symfony/event-dispatcher v4.0.1 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement. 
    Problem 2 
    - Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0]. 
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.22) does not satisfy that requirement. 
    Problem 3 
    - Installation request for symfony/yaml v4.0.1 -> satisfiable by symfony/yaml[v4.0.1]. 
    - symfony/yaml v4.0.1 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement. 
    Problem 4 
    - symfony/event-dispatcher v4.0.1 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement. 
    - symfony/http-kernel v3.4.1 requires symfony/event-dispatcher ~2.8|~3.0|~4.0 -> satisfiable by symfony/event-dispatcher[v4.0.1]. 
    - Installation request for symfony/http-kernel v3.4.1 -> satisfiable by symfony/http-kernel[v3.4.1]. 

과 내가 같은 내 composer.json 파일이 : 나를 도울 수

{ 
    "name": "laravel/laravel", 
    "description": "The Laravel Framework.", 
    "keywords": ["framework", "laravel"], 
    "license": "MIT", 
    "type": "project", 
    "require": { 
     "php": ">=5.6.4", 
     "brozot/laravel-fcm": "^1.2", 
     "guzzlehttp/guzzle": "^6.3", 
     "laravel/framework": "5.4.*", 
     "laravel/tinker": "~1.0", 
     "maatwebsite/excel": "^2.1", 
     "prettus/l5-repository": "^2.6", 
     "pusher/pusher-php-server": "^3.0", 
     "yajra/laravel-datatables-oracle": "8.*", 
     "zizaco/entrust": "5.2.x-dev" 
    }, 
    "require-dev": { 
     "fzaninotto/faker": "~1.4", 
     "mockery/mockery": "0.9.*", 
     "phpunit/phpunit": "~5.7" 
    }, 
    "autoload": { 
     "classmap": [ 
      "database" 
     ], 
     "psr-4": { 
      "App\\": "app/" 
     }, 
     "files": [ 
      "app/Helper/HelperFunction.php" 
     ] 
    }, 
    "autoload-dev": { 
     "psr-4": { 
      "Tests\\": "tests/" 
     } 
    }, 
    "scripts": { 
     "post-root-package-install": [ 
      "php -r \"file_exists('.env') || 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", 
     "sort-packages": true, 
     "optimize-autoloader": true 
    } 
} 

사람을 매우 도움이 될 것입니다.

+3

_ "symfony/event-dispatcher v4.0.1은 PHP 7.1.3 -> PHP 버전 (7.0.22)이 해당 요구 사항을 만족하지 않습니다"_ <= 매우 자명 한 ? –

답변

4

첫 번째 포인트 : composer을 루트 권한으로 실행하지 마십시오. 필요가 없습니다. 나중에 문제가 발생할 것입니다.

두 번째 포인트는 :

symfony/event-dispatcher v4.0.1 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement. 

: 그래서이 라인은 모든 것을 보여줍니다 당신이 v7.1.3에서 PHP 이상 PHP 7.0.22을 사용하여 필요 심포니의 V4를 설치하려는. 그건 단순히 불가능합니다. symfony 3.4를 업데이트하거나 symfony를 사용하십시오.

+1

도와 주셔서 고맙습니다. 마침내 내 문제가 해결됨 @ MagnusEriksson –

+1

나를 도와 주셔서 고맙습니다. 마침내 내 문제가 해결됨 @NicoHaase –