报错laravel/horizon v1.4.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing ...

2019/02/19 17:47
阅读数 1.2K

 

执行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后结果如下:

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部