我正在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扩展名?
发布评论