2013-03-05 92 views
2

我曾经有MAMP(http://www.mamp.info/en/index.html)。卸载并通过Macports安装“MAMP”。重新安装PHP梨

我完全删除/ Applications/MAMP /文件夹。我现在想通过pear安装PHPUnit。

梨安装:

> which pear 
/opt/local/bin/pear 

> pear config-show 
Configuration (channel pear.php.net): 
===================================== 
Auto-discover new Channels  auto_discover <not set> 
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   /Applications/MAMP/bin/php/php5.3.6/bin/ 
PEAR documentation directory doc_dir   /Applications/MAMP/bin/php5.3/docs 
PHP extension directory  ext_dir   /opt/local/lib/php/extensions/no-debug-non-zts-20090626 
PEAR directory     php_dir   /Applications/MAMP/bin/php5.3/share/pear 
PEAR Installer cache directory cache_dir  /private/tmp/pear/cache 
PEAR configuration file  cfg_dir   /Applications/MAMP/bin/php5.3/cfg 
directory 
PEAR data directory   data_dir   /Applications/MAMP/htdocs/pear 
PEAR Installer download  download_dir  /tmp/pear/install 
directory 
PHP CLI/CGI binary    php_bin   /opt/local/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/install 
PEAR test directory   test_dir   /Applications/MAMP/bin/php5.3/tests 
PEAR www files directory  www_dir   /Applications/MAMP/bin/php5.3/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/local/bin/gpg 
Signature Key Directory  sig_keydir  /opt/local/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   /Users/*removed*/.pearrc 
System Configuration File  Filename   /opt/local/etc/pear.conf 

有很多,而我已经删除(神秘地不断再生)/应用程序/ MAMP /文件夹结构引用。我想删除所有这些引用,但不知道应该是什么替代值。我似乎无法卸载梨或升级梨。

理想情况下,我想要一个情况,梨仍然安装和PHPUnit安装,以便我可以运行一些测试。

回答

2

您可以pear config-set调整这些配置值,例如

$ pear config-set php_dir /usr/share/pear/php 
$ pear config-set data_dir /usr/share/pear/data 

做就是以“破”的系统的全部配置值。

之后,可以手动将文件从旧目录移动到新目录,或者重新安装所有软件包。

+0

我有一个不同的问题,然后这个,但你的解决方案帮了我。谢谢。 – jsteinmann 2013-03-09 02:49:00

+0

这是什么问题? – cweiske 2013-03-09 08:17:31

+0

梨的安装有冲突,配置被搞砸了,并指向错误的位置。此外,执行诸如phpunit之类的扩展所需的文件不在命令行中使用的bin中。无论如何,这帮了我,现在我的安装是所有设置。我猜这种事情发生在你有mamp和zend服务器的同时在php中建立OSX的时候。 – jsteinmann 2013-03-09 18:46:27