解决办法hhxsv5/laravel-s v3.5.9 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system

问题描述:

Problem 1

    – hhxsv5/laravel-s v3.5.9 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.8 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.7 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.6 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.5 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.4 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.2 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.17 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.16 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.15 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.14 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.13 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.12 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.11 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.1 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – hhxsv5/laravel-s v3.5.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    – Installation request for hhxsv5/laravel-s ~3.5.0 -> satisfiable by hhxsv5/laravel-s[v3.5.0, v3.5.1, v3.5.10, v3.5.11, v3.5.12, v3.5.13, v3.5.14, v3.5.15, v3.5.16, v3.5.17, v3.5.2, v3.5.3, v3.5.4, v3.5.5, v3.5.6, v3.5.7, v3.5.8, v3.5.9].

  To enable extensions, verify that they are enabled in your .ini files:
    – /etc/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 to its original content.


解决办法:

在composer.json中增加

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

调整下对齐,检查下花括号是否匹配。再执行composer install后结果如下: