When I run composer install
on command promp, there exist error like this :
Problem 1
- Installation request for laravel/horizon v1.1.0 -> satisfiable by laravel/horizon[v1.1.0].
- laravel/horizon v1.1.0 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:
- C:\xampp-7.1\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
How can I solve this error?
I have installed PHP 7.2 instead of 7.1 and everything works fine now. It appears that pcntl was not present in 7.1 but it's installed with php 7.2.
Run composer with the
--ignore-platform-reqs
option and specifypcntl
andposix
As per the accepted answer, but you can add this to your composer.json so that you don't have to run
--ignore-platform-reqs
all the timepcntl
extension is not supported on Windows. (based on your XAMPP information)Please see these github issues on laravel/horizon page #131, #78.
I suggest you use Laravel Homestead on your Windows system, It is easy to setup and will save you from many of the similar problems in future.
If you're running on windows 10 without homestead you can enable the linux subsystem and run horizon through that.
https://www.windowscentral.com/how-install-bash-shell-command-line-windows-10
Then install the requirements
This also can run laravel envoy too which doesn't work on windows.
It's a nice lightweight solution
If you are using docker based on a Unix image you can add it with the docker utility:
You can then confirm that this extension is installed and enabled inside of your container: