执行composer install后报以下错误:

Problem 1
- laravel/horizon v1.4.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- laravel/horizon v1.4.2 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- laravel/horizon v1.4.1 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- laravel/horizon v1.4.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- laravel/horizon v1.3.1 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- laravel/horizon v1.3.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- laravel/horizon v1.4.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
- Installation request for laravel/horizon ^1.3 -> satisfiable by laravel/horizon[v1.3.0, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.4.3].

解决办法:

在composer.json中增加

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

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

报错laravel/horizon v1.4.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.的解决办法-LMLPHP

05-11 02:33