Unable to install PHPUnit_Invoker on Windows 7
我正在尝试安装 PHPUnit_Invoker。我在命令行上运行命令 pear install phpunit/PHP_Invoker。我收到这条消息:
No releases available for package”pear.phpunit.de/PHP_Invoker”
我已经在一台 Windows 机器上安装了 PHPUnit 和 PEAR。有没有人也遇到类似的问题?
我又试了一次,我在控制台中收到了这条消息:
phpunit/PHP_Invoker requires PHP extension”pcntl” No valid packages found install failed
- 现在今天我再次尝试并在控制台中收到此消息。\\’phpunit/PHP_Invoker 需要 PHP 扩展 “pcntl” 找不到有效的包安装失败\\’。
PHP 扩展是€?PCNTLa€? PHP_Invoker 所需的(进程控制)目前在非 Unix 平台 (Windows) 上不起作用。
来源:http://www.php.net/manual/en/pcntl.installation.php(2013 年 1 月 31 日)
- 为什么不接受我的回答?根据 Sebastian Bergman 的说法:”PHP_Invoker 是 PHPUnit 的可选依赖项。当未安装 PHP_Invoker(或其依赖项 ext/pcntl)时,PHPUnit 依赖 PHP_Invoker 的功能不可用。”来源:github.com/sebastianbergmann/ php-invoker/issues/6 并且 php.net 仍然写道:”目前,此模块 [Process Control (pcntl)] 将无法在非 Unix 平台 (Windows) 上运行。” 来源:php.net/manual/en /pcntl.installation.php
试试看:
1
2 3 |
>pear config–set auto_discover 1
>pear clear–cache >pear install pear.phpunit.de/PHPUnit |
我遇到了同样的问题,但似乎在 Windows 7 上安装了 WAMP
- -1。这是 PHPUnit 安装,而不是 PHP_Invoke。
\\’force\\’ 应该做的工作
1
|
pear install —alldeps —force phpunit/PHPUnit
|
来源:https://www.codenong.com/13763154/