Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while installing Horizon on windows #78

Closed
dhsont opened this issue Aug 7, 2017 · 11 comments
Closed

Error while installing Horizon on windows #78

dhsont opened this issue Aug 7, 2017 · 11 comments

Comments

@dhsont
Copy link

dhsont commented Aug 7, 2017

Hi,
When i try to install Horizon on windows dev machine it gives following error

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

But pcntl is not available for windows

How to install without pcntl.

@dhsont dhsont changed the title Can not install Horizon on windows Can not able to install Horizon on windows Aug 7, 2017
@dhsont dhsont changed the title Can not able to install Horizon on windows Error while installing Horizon on windows Aug 7, 2017
@dhsont
Copy link
Author

dhsont commented Aug 7, 2017

Can we use pthreads https://github.com/krakjoe/pthreads

instead of pcntl

pthreads supports windows ,mac,linux

@themsaid
Copy link
Member

themsaid commented Aug 8, 2017

Sorry no plans for this at the moment :) I suggest that you use something like Laravel Homestead and run a virtual machine where you can use Ubuntu.

@themsaid themsaid closed this as completed Aug 8, 2017
@JapSeyz
Copy link

JapSeyz commented Sep 1, 2017

@john5db The very talented developer of Laragon has ported the extension (more or less, it's still experimental at this point) to windows, you can get it here: https://forum.laragon.org/topic/593/how-to-add-pcntl-extension-windows

@mtx-z
Copy link

mtx-z commented Oct 7, 2017

Latest release 1.0.5 have a new windows issue making it impossible to install.
I successfully fixed the PCNTL issue using @JapSeyz solution (Horizon 1.0.0).

Now, on 1.0.5, I'm missing the POSIX PHP extension:

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

I'm running PHP 7.1.9, but PHP posix seems unavailable for Windows.

@cmosguy
Copy link

cmosguy commented Oct 9, 2017

@themsaid @mtx-z yup I am stuck here on the posix issue issue as well. Is there a a strong need for this extension for some reason?

@chilio
Copy link

chilio commented Dec 28, 2017

@themsaid you are right, but what if I'm using Homestead already.
This broke my workflow, cause I can't use composer commands directly in IDE anymore.

@kiwina
Copy link

kiwina commented Feb 26, 2018

if you just developing on windows and deploying on linux use --ignore-platform-reqs with your composer command, this will still install horizon you still see the dashboard but its useless on windows.

@leonmbj
Copy link

leonmbj commented Jun 15, 2018

Instead using 'php artisan horizon', try:

php artisan queue:listen --queue=default,mongodb,special

where default,mongodb,special are your queue names - put all of them
but, this way, sometimes, you will have to exit the command and comeback (cache issues)

@arulananth
Copy link

Check #154

composer require laravel/horizon --ignore-platform-reqs

php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"

@FurrukhJamal
Copy link

So there are still no workarounds with laravel 10 for windows 11?

@ariefan
Copy link

ariefan commented Mar 21, 2024

To run Horizon on Windows 11, the easiest and most recommended method is to utilize Windows Subsystem for Linux (WSL). Assuming you're working with Laravel 11, follow these straightforward steps:

  1. Open PowerShell or Windows Command Prompt as an administrator.
  2. Execute the following command to install WSL, the easiest and most reliable method:
    wsl --install
  3. Follow the prompts to set up your Linux username and password, then restart your machine.
  4. Navigate to your project folder in Windows PowerShell and access the Ubuntu terminal in WSL with the command:
    wsl -d Ubuntu
  5. Install PHP 8.3 and the necessary dependencies for Horizon by running:
sudo add-apt-repository ppa:ondrej/php 
sudo apt update
sudo apt-get install redis
sudo apt-get install zip php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,xml,dom,zip,redis}
  1. Finally, install and run Horizon using Composer and Artisan commands:
composer require laravel/horizon
php artisan horizon:install
php artisan horizon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests