简体   繁体   中英

phpunit file not found afer install via pear

I have installed with success phpunit:

sudo pear install --alldeps pear.phpunit.de/PHPUnit

but when I prompt phpunit in console I am getting error:

bash: /usr/bin/phpunit: No file or directory

I have:

  • PEAR Version: 1.9.4
  • PHP Version: 5.3.6-13ubuntu3.6

Could somebody give me any advice?

pear list gives me:

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)

Use the --force

sudo pear install --force --alldeps pear.phpunit.de/PHPUnit

This will reinstall all the packages and usually works around the most common pear issues and this looks like one of the cases where it just didn't quite finish up everything and if you don't --force it to reinstall it will assume all packages are working fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM