install phpunit laravel
No se puede instalar PHPUnit a través de PEAR, requiere PEAR Installer>=1.9.2, no se puede actualizar PEAR desde 1.9.0 (2)
Básicamente, tiene 2 instalaciones de pera en su máquina, y el comando "actualizar pera" actualiza la otra, no a sí misma.
Supongo que la versión pera que está ejecutando se ha instalado a través de apt de ubuntu.
Averigüe dónde se ha instalado con apt
(en Debian / Ubuntu):
$ dpkg -L php-pear
...
/usr/share/php/PEAR.php
...
/usr/bin/pear
Ahora veamos donde perla instala los archivos para:
$ pear config-get php_dir
/usr/share/php
En mi máquina, es lo mismo, pero probablemente no en la tuya, que es el problema. Arreglarlo configurando el php_dir
, así como el bin_dir
:
$ pear config-set php_dir /usr/share/php
$ pear config-set bin_dir /usr/bin
Alternativamente , elimine el ubuntu pear e instálelo recientemente desde http://pear.php.net/go-pear.phar
Leí las otras preguntas de instalación de PHPUnit pero no he tenido ningún éxito. ¿Qué está pasando con mi instalación PEAR?
$ sudo pear update-channels
Updating channel "components.ez.no"
Channel "components.ez.no" is up to date
Updating channel "doc.php.net"
Channel "doc.php.net" is up to date
Updating channel "pear.php.net"
Channel "pear.php.net" is up to date
Updating channel "pear.phpunit.de"
Channel "pear.phpunit.de" is up to date
Updating channel "pear.symfony-project.com"
Channel "pear.symfony-project.com" is up to date
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
$ sudo pear upgrade pear
Nothing to upgrade
$ sudo pear install phpunit/PHPUnit
phpunit/PHPUnit requires PEAR Installer (version >= 1.9.2), installed version is 1.9.0
phpunit/PHPUnit can optionally use PHP extension "dbus"
phpunit/DbUnit requires PEAR Installer (version >= 1.9.2), installed version is 1.9.0
phpunit/File_Iterator requires PEAR Installer (version >= 1.9.2), installed version is 1.9.0
phpunit/PHP_CodeCoverage requires PEAR Installer (version >= 1.9.1), installed version is 1.9.0
phpunit/PHP_CodeCoverage requires package "phpunit/File_Iterator" (version >= 1.2.2)
phpunit/PHP_CodeCoverage can optionally use PHP extension "xdebug" (version >= 2.0.5)
phpunit/PHPUnit_MockObject requires PEAR Installer (version >= 1.9.2), installed version is 1.9.0
phpunit/PHPUnit_Selenium requires PEAR Installer (version >= 1.9.2), installed version is 1.9.0
phpunit/PHP_TokenStream requires PEAR Installer (version >= 1.9.1), installed version is 1.9.0
No valid packages found
install failed
$ pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.7 stable
Cache_Lite 1.7.11 stable
Console_Getopt 1.3.1 stable
HTTP_Request2 2.0.0RC1 beta
Net_URL2 0.3.1 beta
PEAR 1.9.3 stable
Structures_Graph 1.0.4 stable
XML_RPC2 1.1.1 stable
XML_Util 1.2.1 stable
greg@ubuntu:~$ pear -V
PEAR Version: 1.9.0
PHP Version: 5.3.6
Zend Engine Version: 2.3.0
Running on: Linux ubuntu 2.6.32-32-generic-pae #62-Ubuntu SMP Wed Apr 20 22:10:33 UTC 2011 i686
informes de la pear list
1.9.3 instalado, informes de pear -V
1.9.0!?!
Actualizar Tried sugerencia KingCrunch.
$ sudo pear install -f pear
[sudo] password for greg:
downloading PEAR-1.9.3.tgz ...
Starting to download PEAR-1.9.3.tgz (295,774 bytes)
...........................done: 295,774 bytes
install ok: channel://pear.php.net/PEAR-1.9.3
PEAR: Optional feature webinstaller available (PEAR''s web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR''s PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR''s PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
$ pear -V
PEAR Version: 1.9.0
PHP Version: 5.3.6
Zend Engine Version: 2.3.0
Running on: Linux ubuntu 2.6.32-32-generic-pae #62-Ubuntu SMP Wed Apr 20 22:10:33 UTC 2011 i686
Si no tiene éxito con la parte de pera, eche un vistazo a esto.
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit
ref: http://phpunit.de/manual/3.7/en/installation.html
También puede utilizar inmediatamente el PHAR después de haberlo descargado;
wget https://phar.phpunit.de/phpunit.phar
php phpunit.phar