如何在Windows中安装PCNTL扩展名?

编程入门 行业动态 更新时间:2024-10-28 01:25:13
本文介绍了如何在Windows中安装PCNTL扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在Windows中运行PHPUnit,并尝试通过 composer.json 安装PHPUnit:

I am running PHPUnit in Windows and trying to install PHPUnit via composer.json:

"phpunit/php-invoker": "*"

...具有这种依赖性,但出现此错误:

...with this dependency, but I am getting this error:

phpunit/php-invoker 1.1.3需要ext-pcntl *->您的系统中缺少所请求的PHP扩展pcntl.

phpunit/php-invoker 1.1.3 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.

如何安装此扩展程序?

推荐答案

您无法在Windows上安装ext-pcntl扩展名.根据PHP文档:

You can't install ext-pcntl extension on Windows. Accordingly to the PHP documentation:

当前,该模块在非Unix平台上将不起作用 (Windows).

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

如果要安装PHPUnit,则只需安装PHPUnit库:

If you want to install PHPUnit all you need is the PHPUnit library:

composer require phpunit/phpunit 4.*

您不需要php-invoker来安装PUPUnit.但是,如果您还需要php-invoker库,那么您很不走运.尝试将Vagrant或普通VM与Linux发行版(如Ubuntu,Debian或Mint)一起使用.

You don't need php-invoker to install PUPUnit. But if you also need the php-invoker library you are out of luck. Try using Vagrant or a plain VM with Linux distributions like Ubuntu, Debian or Mint.

更多推荐

如何在Windows中安装PCNTL扩展名?

本文发布于:2023-10-14 19:11:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1491953.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:扩展名   如何在   Windows   PCNTL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!