解决 composer install 报错 laravel/horizon v3.7.2 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system

当我们在命令行运行 composer install ,出现了如下错误信息:

1
2
3
4
5
6
7
8
9
10
11
12
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for laravel/horizon v3.7.2 -> satisfiable by laravel/horizon[v3.7.2].
- laravel/horizon v3.7.2 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.

To enable extensions, verify that they are enabled in your .ini files:
- D:\phpStudy\PHPTutorial\php\php-7.2.1-nts\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

解决方法:

使用 --ignore-platform-reqs 选项运行composer,并指定 pcntlposix

1
composer install --ignore-platform-reqs
坚持原创技术分享,您的支持将鼓励我继续创作!
0%