윈도우 컴포저 패키지 설치시 오류 처리 방법

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/horizon v4.2.1 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    - laravel/horizon v4.2.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    - laravel/horizon 4.x-dev requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
    - Installation request for laravel/horizon ^4.2 -> satisfiable by laravel/horizon[4.x-dev, v4.2.0, v4.2.1].

Laravel Horizon을 windows에서 설치하려 할 때 위와 같은 오류가 발생하였습니다.

pcntl은 윈도우에서 지원이 되지 않으므로 Docker 또는 Vargrant와 같은 가상환경을 사용해야 합니다. Link

또는 아래와 같이 실행하여 설치를 완료 할 수 있습니다.

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

--ignore-platform-reqs 옵션의 설명은 해당 링크에서 확인할 수 있습니다. Link

ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these. See also the platform config option.

패키지를 설치하는데 필요한 조건을 충족하지 못하더라도 무시하고 설치를 실행하는 옵션입니다.

필요 조건을 모두 충족하지 않은 경우이므로 정상동작에 실패 할 수 있습니다.