composer报错composer.json requires PHP extension ext-pcntl * but it is missing from your system

报错:

Root composer.json requires PHP extension ext-pcntl * but it is missing from your system. Install or enable PHP’s pcntl extension.

解决方法:
在composer.json中增加

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


版权声明:本文为Kobe__Bryant__原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。