我已经通过 Pear 以及 PHP 5.4.11 安装了 PHPunit。我用谷歌搜索了我的解决方案,这导致了 stackoverflow 上的其他页面,但没有一个能够解决我的问题。很抱歉,我不能简单地“查找”,因为我已经尝试过了,但仍然无法解决为什么我在启动 phpunit 时收到此错误而不是 root。
[james@roberts ~]$ phpunit --version
PHP Warning: require_once(File/Iterator/Autoload.php): failed to open stream: No such file or directory in /usr/local/lib/php/PHPUnit/Autoload.php on line 64
Warning: require_once(File/Iterator/Autoload.php): failed to open stream: No such file or directory in /usr/local/lib/php/PHPUnit/Autoload.php on line 64
PHP Fatal error: require_once(): Failed opening required 'File/Iterator/Autoload.php' (include_path='.:/usr/local/share/pear:/usr/local/pear/share/pear:/root/pear/share/pear') in /usr/local/lib/php/PHPUnit/Autoload.php on line 64
Fatal error: require_once(): Failed opening required 'File/Iterator/Autoload.php' (include_path='.:/usr/local/share/pear:/usr/local/pear/share/pear:/root/pear/share/pear') in /usr/local/lib/php/PHPUnit/Autoload.php on line 64
[james@roberts ~]$ sudo phpunit --version
PHPUnit 3.7.21 by Sebastian Bergmann.