如何在Windows中安装PCNTL扩展名? [英] How to install PCNTL extension in Windows?

查看:3294
本文介绍了如何在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扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆