PHP pcntl 模块安装

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30053934/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 21:30:43  来源:igfitidea点击:

PHP pcntl module installation

php

提问by MUHAMMAD AHSAN

Problems

问题

  1. d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
  2. d11wtq/boris v1.0.10 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.
  3. Installation request for d11wtq/boris v1.0.10 -> satisfiable by d11wtq/boris[v1.0.10].
  1. d11wtq/boris v1.0.10 需要 ext-pcntl * -> 系统中缺少请求的 PHP 扩展 pcntl。
  2. d11wtq/boris v1.0.10 需要 ext-pcntl * -> 系统中缺少请求的 PHP 扩展 pcntl。
  3. d11wtq/boris v1.0.10 的安装请求 -> d11wtq/boris[v1.0.10] 可满足。

When I run command: composer install it creating error.

当我运行命令时:composer install it 创建错误。

And also how to install extension on php.init.

以及如何在 php.init 上安装扩展。

extension=php_curl.dll

回答by PI.

I fixed this by running composer updatebefore install.

我通过composer update在安装前运行来解决这个问题。

回答by Szigyártó Mihály

I know this is an old one, but I ran into the same problem and with this switch just solved it:

我知道这是一个旧的,但我遇到了同样的问题,这个开关刚刚解决了它:

composer install --ignore-platform-reqs

回答by AndreL

Solved my problem updating and ignoring requested PHP extensions:

解决了我更新和忽略请求的 PHP 扩展的问题:

composer update --ignore-platform-reqs

composer update --ignore-platform-reqs

回答by Samuel

http://php.net/manual/en/pcntl.installation.php

http://php.net/manual/en/pcntl.installation.php

Process Control support in PHP is not enabled by default. You have to compile the CGI or CLI version of PHP with --enable-pcntl configuration option when compiling PHP to enable Process Control support.

Note: Currently, this module will not function on non-Unix platforms (Windows).

PHP 中的进程控制支持默认未启用。在编译 PHP 以启用进程控制支持时,您必须使用 --enable-pcntl 配置选项编译 CGI 或 CLI 版本的 PHP。

注意:目前,此模块在非 Unix 平台 (Windows) 上不起作用。

回答by hadi.mansouri

I had the same problem on my system (OpenSUSE, PHP7). Simply installing php7-pcntl solved my problem.

我的系统(OpenSUSE、PHP7)也遇到了同样的问题。只需安装 php7-pcntl 就解决了我的问题。

回答by Mayank Dudakiya

We can resolve this issue by following way.

我们可以通过以下方式解决这个问题。

Your options are as follows:

您的选择如下:

  • Install the required extensions (best option)
  • Run composer with the --ignore-platform-reqs flag (very hacky) like composer update --ignore-platform-reqs
  • Upgrade to Laravel 5 (we no longer user boris for the tinker command)
  • 安装所需的扩展(最佳选择)
  • 使用 --ignore-platform-reqs 标志(非常hacky)像运行作曲家 composer update --ignore-platform-reqs
  • 升级到 Laravel 5(我们不再使用 boris 来执行 tinker 命令)