前言

解决laravel安装laravel-s 安装失败

失败:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - hhxsv5/laravel-s[v3.7.0, ..., v3.7.30] require ext-pcntl * -> it is missing from your system. Install or enable PHP's pcntl extension.
    - Root composer.json requires hhxsv5/laravel-s ^3.7 -> satisfiable by hhxsv5/laravel-s[v3.7.0, ..., v3.7.30].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\wamp\bin\php\php7.2.14\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

解决

在 `composer.json` 增加:


    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "platform": {
            "ext-pcntl": "7.2",
            "ext-posix": "7.2"
        }
    },

结果

再尝试安装√

composer require hhxsv5/laravel-s

GeorgieのBlog,分享生活的点点滴滴,分享代码干货