Php composer安装-无法将您的需求解析为可安装的软件包集

Php composer安装-无法将您的需求解析为可安装的软件包集,php,laravel-5,composer-php,Php,Laravel 5,Composer Php,我想在项目上运行composer安装时出错。 发布的错误如下: arief@arief-X45C:~/Triplogic/tripologic-admin-laravel$ sudo composer install Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could

我想在项目上运行
composer安装时出错。
发布的错误如下:

arief@arief-X45C:~/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].
{
    "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
    }
}
我的
composer.json
文件如下:

arief@arief-X45C:~/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].
{
    "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
    }
}

任何能帮助我的人,这都会非常有帮助。

第一点:不要使用root权限运行
composer
——没有必要,它只会在以后引起问题

第二点:这一行显示了一切:

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

所以:您正在尝试安装SymfonyV4,它需要使用PHP7.0.22在v7.1.3或更高版本中安装PHP。这根本不可能。更新您的PHP安装或使用Symfony 3.4第一点:不要使用root权限运行
composer
——没有必要,它只会在以后引起问题

第二点:这一行显示了一切:

symfony/event-dispatcher v4.0.1 requires php ^7.1.3 -> your PHP version (7.0.22) does not satisfy that requirement.
所以:您正在尝试安装SymfonyV4,它需要使用PHP7.0.22在v7.1.3或更高版本中安装PHP。这根本不可能。更新PHP安装或使用Symfony 3.4

  • sudoapt安装php-xml
  • sudo-apt-get-install-php-curl
  • sudo-apt-get-install-php-mbstring
  • 作曲家更新
  • 编写器安装
  • Me Functionó:

  • sudoapt安装php-xml
  • sudo-apt-get-install-php-curl
  • sudo-apt-get-install-php-mbstring
  • 作曲家更新
  • 编写器安装

  • “symfony/event dispatcher v4.0.1需要php^7.1.3->您的php版本(7.0.22)不满足该要求”“symfony/event dispatcher v4.0.1需要php^7.1.3->您的php版本(7.0.22)不满足该要求”“非常感谢您的帮助。”。最后我的问题解决了@Magnuseriksson非常感谢你对我的帮助。最后我的问题解决了@Nicohaase非常感谢你对我的帮助。最后我的问题解决了@Magnuseriksson非常感谢你对我的帮助。最后我的问题解决了@NicoHaase