Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to install phpunit/PHPUnit. I get something like below, I think the problem is that Archive/Tar.php is not found? I tried using the --alldeps switch and got the same error. Trying to install pear install archive_tar even gives the same error where Archive/Tar.php was not found!

D:\ResourceLibrary\Frameworks>pear install phpunit/PHPUnit
phpunit/PHPUnit can optionally use PHP extension "dbus"
downloading PHPUnit-3.5.5.tgz ...
Starting to download PHPUnit-3.5.5.tgz (116,148 bytes)
.........................done: 116,148 bytes

Warning: require_once(Archive/Tar.php): failed to open stream: No such file or directory in PEAR\PackageFile.php on line
 303

Warning: require_once(Archive/Tar.php): failed to open stream: No such file or directory in C:\Program Files (x86)\PHP\p
ear\PEAR\PackageFile.php on line 303

Call Stack:
    0.0051     531000   1. {main}() C:\Program Files (x86)\PHP\pear\pearcmd.php:0
    0.3031    3490920   2. PEAR_Command_Common->run() C:\Program Files (x86)\PHP\pear\pearcmd.php:305
    0.3031    3490920   3. PEAR_Command_Install->doInstall() C:\Program Files (x86)\PHP\pear\PEAR\Command\Common.php:271

    0.3672    5387880   4. PEAR_Downloader->download() C:\Program Files (x86)\PHP\pear\PEAR\Command\Install.php:661
   62.4850    8482968   5. PEAR_Downloader_Package->download() C:\Program Files (x86)\PHP\pear\PEAR\Downloader.php:453
   62.4906    8488512   6. PEAR_Downloader_Package->_fromUrl() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.p
hp:263
   63.1216    8490512   7. PEAR_PackageFile->fromAnyFile() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.php:1
622
   63.1226    8490616   8. PEAR_PackageFile->fromTgzFile() C:\Program Files (x86)\PHP\pear\PEAR\PackageFile.php:483


Fatal error: require_once(): Failed opening required 'Archive/Tar.php' (include_path='C:\Program Files (x86)\PHP\pear')
in C:\Program Files (x86)\PHP\pear\PEAR\PackageFile.php on line 303

Call Stack:
    0.0051     531000   1. {main}() C:\Program Files (x86)\PHP\pear\pearcmd.php:0
    0.3031    3490920   2. PEAR_Command_Common->run() C:\Program Files (x86)\PHP\pear\pearcmd.php:305
    0.3031    3490920   3. PEAR_Command_Install->doInstall() C:\Program Files (x86)\PHP\pear\PEAR\Command\Common.php:271

    0.3672    5387880   4. PEAR_Downloader->download() C:\Program Files (x86)\PHP\pear\PEAR\Command\Install.php:661
   62.4850    8482968   5. PEAR_Downloader_Package->download() C:\Program Files (x86)\PHP\pear\PEAR\Downloader.php:453
   62.4906    8488512   6. PEAR_Downloader_Package->_fromUrl() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.p
hp:263
   63.1216    8490512   7. PEAR_PackageFile->fromAnyFile() C:\Program Files (x86)\PHP\pear\PEAR\Downloader\Package.php:1
622
   63.1226    8490616   8. PEAR_PackageFile->fromTgzFile() C:\Program Files (x86)\PHP\pear\PEAR\PackageFile.php:483

D:\ResourceLibrary\Frameworks>

UPDATE: I should say its on Windows, I have no problems installing on Ubuntu

share|improve this question
    
How about "pear upgrade pear" and then trying phpunit? –  Rob Olmos Dec 16 '10 at 4:56
    
I solved the problem my reinstalling PEAR, I think Archive_Tar should be installed with PEAR –  Jiew Meng Dec 16 '10 at 7:00

1 Answer 1

up vote 2 down vote accepted

I solved the problem by reinstalling PEAR, I think Archive_Tar should be installed with PEAR

share|improve this answer
    
Mark it as your answer dude :-) –  RakeshS Jun 21 '11 at 5:35
    
This was the issue for me. Apparently PEAR doesn't always intall Archive_Tar correctly the first time. Simply running the go-pear.phar script again solved the issue. –  imkingdavid May 22 '13 at 7:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.