我已成功安装phpunit:
sudo pear install --alldeps pear.phpunit.de/PHPUnit
但是当我在控制台中提示phpunit时,我收到错误:
bash:/ usr / bin / phpunit:没有文件或目录
我有:
有人可以给我任何建议吗?
梨列表给了我:Installed packages, channel __uri:
==================================
(no packages installed)
Installed packages, channel components.ez.no:
=============================================
Package Version State
Base 1.8 stable
ConsoleTools 1.6.1 stable
Installed packages, channel doc.php.net:
========================================
(no packages installed)
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.9 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable
Installed packages, channel pear.phpunit.de:
============================================
Package Version State
File_Iterator 1.3.1 stable
PHPUnit 3.6.10 stable
PHPUnit_MockObject 1.1.1 stable
PHP_CodeCoverage 1.1.2 stable
PHP_Invoker 1.1.0 stable
PHP_Timer 1.0.2 stable
PHP_TokenStream 1.1.3 stable
Text_Template 1.1.1 stable
Installed packages, channel pear.symfony-project.com:
=====================================================
Package Version State
YAML 1.0.6 stable
Installed packages, channel pecl.php.net:
=========================================
(no packages installed)
答案 0 :(得分:8)
sudo pear install --force --alldeps pear.phpunit.de/PHPUnit
这将重新安装所有软件包,并且通常可以解决最常见的梨问题,这看起来就像其中一个案例,它只是没有完成所有内容,如果你没有--force
它重新安装它将假设所有包都工作正常。