在MAMP MacOsX上更新PEAR

时间:2012-04-11 13:50:23

标签: php pear

目前我正在尝试在我的mac os x和mamp服务器上安装phpunit:

pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit

我在安装过程中遇到的错误:

Validation Error: This package.xml requires PEAR version 1.9.4 to parse properly, we are version 1.9.2
pear upgrade pear
Nothing to upgrade

更新1

这是我的梨配置。我假设我搞乱了本地和mamp安装(我不知道mamp也有梨,所以我安装了本地)。

我认为bin_dir,php_dir和其他路径有问题吗?

Keefir-Samolet-iMac:MAMP jevgenismirnov$ 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       
PEAR server [DEPRECATED]       master_server    pear.php.net
Default Channel Mirror         preferred_mirror pear.php.net
Remote Configuration File      remote_config    
PEAR executables directory     bin_dir          /Users/jevgenismirnov/pear/bin
PEAR documentation directory   doc_dir          /Users/jevgenismirnov/pear/docs
PHP extension directory        ext_dir          /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/
PEAR directory                 php_dir          /Users/jevgenismirnov/pear/share/pear
PEAR Installer cache directory cache_dir        /var/folders/k7/xpwbcbrs1xs8tlxjk5mvkwrr0000gp/T//pear/cache
PEAR configuration file        cfg_dir          /Users/jevgenismirnov/pear/cfg
directory
PEAR data directory            data_dir         /Users/jevgenismirnov/pear/data
PEAR Installer download        download_dir     /tmp/pear/install
directory
PHP CLI/CGI binary             php_bin          /Applications/MAMP/bin/php/php5.3.6/bin/php
php.ini location               php_ini          
--program-prefix passed to     php_prefix       
PHP's ./configure
--program-suffix passed to     php_suffix       
PHP's ./configure
PEAR Installer temp directory  temp_dir         /tmp/pear/install
PEAR test directory            test_dir         /Users/jevgenismirnov/pear/tests
PEAR www files directory       www_dir          /Users/jevgenismirnov/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         
maintainers)
Signature Handling Program     sig_bin          /usr/local/bin/gpg
Signature Key Directory        sig_keydir       /Applications/MAMP/bin/php/php5.3.6/conf/pearkeys
Signature Key Id               sig_keyid        
Package Signature Type         sig_type         gpg
PEAR username (for             username         
maintainers)
User Configuration File        Filename         /Users/jevgenismirnov/.pearrc
System Configuration File      Filename         /Applications/MAMP/bin/php/php5.3.6/conf/pear.conf

1 个答案:

答案 0 :(得分:2)

好的,我的坏!

问题在于2个梨装置。

跑完后:

pear uninstall pear;
pear config-set bin_dir /Applications/MAMP/bin/php/php5.3.6/bin;
pear config-set doc_dir /Applications/MAMP/bin/php/php5.3.6/lib/php/doc;
pear config-set ext_dir /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626;
pear config-set php_dir /Applications/MAMP/bin/php/php5.3.6/lib/php;
pear config-set data_dir /Applications/MAMP/bin/php/php5.3.6/lib/php/data;
pear config-set php_bin /Applications/MAMP/bin/php/php5.3.6/bin/php;
pear config-set test_dir /Applications/MAMP/bin/php/php5.3.6/lib/php/test;
pear config-set www_dir /Applications/MAMP/bin/php5.2/lib/php/www

一切都很好。

感谢您的帮助。