Я недавно установил PHPUnit, используя установщик пакета pear, как указано в документации.Груша в настоящее время установлена в /usr/local/lib/php/pear
.Тем не менее, PHPUnit, кажется, устанавливает себя в /usr/share/pear
, и поэтому я получаю сообщения об ошибках при попытке запустить phpunit --version
или phpunit --help
.
Я вижу три возможных решения, но я боюсь столкнуться спроблемы позже, если я выберу не тот.Вот возможные решения: (A) переместить каталог PHPUnit из /usr/share/pear/PHPUnit
в /usr/local/lib/php/pear/PHPUnit
, (B) переместить каталог PHPUnit в /usr/local/lib/php/pear/share/pear/PHPUnit
или (C) переустановить phpunit с помощью какой-либо дополнительной команды или переключателя, чтобы получить егоустановить в нужное место?
Заранее благодарен за помощь.
ОБНОВЛЕНИЕ: Вот вывод pear config-show
при запуске под моим именем пользователя:
Configuration (channel pear.php.net):
=====================================
Auto-discover new Channels auto_discover 1
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir /usr/bin
PEAR documentation directory doc_dir /usr/local/lib/php/pear/docs
PHP extension directory ext_dir /usr/lib64/php/modules
PEAR directory php_dir /usr/local/lib/php
PEAR Installer cache directory cache_dir /tmp/pear/cache
PEAR configuration file cfg_dir /usr/share/pear/cfg
directory
PEAR data directory data_dir /usr/local/lib/php/pear/data
PEAR Installer download download_dir /tmp/pear/download
directory
PHP CLI/CGI binary php_bin /usr/bin/php
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
--program-suffix passed to php_suffix <not set>
PHP's ./configure
PEAR Installer temp directory temp_dir /tmp/pear/temp
PEAR test directory test_dir /usr/local/lib/php/pear/tests
PEAR www files directory www_dir /usr/share/pear/www
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 27
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin /usr/bin/gpg
Signature Key Directory sig_keydir /etc/pearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename /home/webdeveloper/.pearrc
System Configuration File Filename /etc/pear.conf
А вот вывод pear config-show
при запуске от имени пользователя root:
Configuration (channel pear.php.net):
=====================================
Auto-discover new Channels auto_discover 1
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir /usr/bin
PEAR documentation directory doc_dir /usr/share/pear/docs
PHP extension directory ext_dir /usr/lib64/php/modules
PEAR directory php_dir /usr/share/pear
PEAR Installer cache directory cache_dir /tmp/pear/cache
PEAR configuration file cfg_dir /usr/share/pear/cfg
directory
PEAR data directory data_dir /usr/share/pear/data
PEAR Installer download download_dir /tmp/pear/download
directory
PHP CLI/CGI binary php_bin /usr/bin/php
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
--program-suffix passed to php_suffix <not set>
PHP's ./configure
PEAR Installer temp directory temp_dir /tmp/pear/temp
PEAR test directory test_dir /usr/share/pear/tests
PEAR www files directory www_dir /usr/share/pear/www
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 22
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin /usr/bin/gpg
Signature Key Directory sig_keydir /etc/pearkeys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename /root/.pearrc
System Configuration File Filename /etc/pear.conf