Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
重新安装PHP Pear_Php_Macos_Phpunit_Pear_Macports - Fatal编程技术网

重新安装PHP Pear

重新安装PHP Pear,php,macos,phpunit,pear,macports,Php,Macos,Phpunit,Pear,Macports,我以前有妈妈()。卸载并通过Macports安装“MAMP” 我完全删除了/Applications/MAMP/文件夹。我现在想通过pear安装PHPUnit 安装Pear时: > which pear /opt/local/bin/pear > pear config-show Configuration (channel pear.php.net): ===================================== Auto-discover new Channels

我以前有妈妈()。卸载并通过Macports安装“MAMP”

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

安装Pear时:

> 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
>哪个梨
/opt/local/bin/pear
>梨形图
配置(通道pear.php.net):
=====================================
自动发现新频道自动发现
默认频道默认频道pear.php.net
HTTP代理服务器地址HTTP\U代理
PEAR服务器[已弃用]主服务器PEAR.php.net
默认通道镜像首选\u Mirror pear.php.net
远程配置文件远程配置
PEAR可执行文件目录bin_dir/Applications/MAMP/bin/php/php5.3.6/bin/
PEAR文档目录doc_dir/Applications/MAMP/bin/php5.3/docs
PHP扩展目录ext_dir/opt/local/lib/PHP/extensions/no-debug-non-zts-20090626
PEAR目录php_dir/Applications/MAMP/bin/php5.3/share/PEAR
PEAR安装程序缓存目录cache\u dir/private/tmp/PEAR/cache
PEAR配置文件cfg_dir/Applications/MAMP/bin/php5.3/cfg
目录
PEAR数据目录data\u dir/Applications/MAMP/htdocs/PEAR
PEAR安装程序下载\u dir/tmp/PEAR/install
目录
PHP CLI/CGI二进制PHP_bin/opt/local/bin/PHP
php.ini位置php_ini
--传递给php_前缀的程序前缀
PHP的./configure
--传递给php_后缀的程序后缀
PHP的./configure
PEAR安装程序临时目录temp_dir/tmp/PEAR/install
PEAR测试目录test_dir/Applications/MAMP/bin/php5.3/tests
PEAR www文件目录www_dir/Applications/MAMP/bin/php5.3/www
Cache TimeToLive Cache\u ttl 3600
首选包状态首选_状态稳定
Unix文件掩码umask 22
调试日志级别详细信息1
PEAR密码(用于输入密码)
维修人员)
签名处理程序sig_bin/usr/local/bin/gpg
签名密钥目录sig_keydir/opt/local/etc/pearkeys
签名密钥Id sig_密钥Id
包签名类型sig_类型gpg
PEAR用户名(用于用户名)
维修人员)
用户配置文件Filename/Users/*已删除*/.pearrc
系统配置文件Filename/opt/local/etc/pear.conf
我删除了很多对/Applications/MAMP/文件夹结构的引用(并且神秘地不断更新)。我想删除所有这些引用,但不确定替代值应该是什么。我似乎无法卸载pear或升级pear


理想情况下,我希望pear保持安装,PHPUnit安装,以便我可以运行一些测试。

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

$ pear config-set php_dir /usr/share/pear/php
$ pear config-set data_dir /usr/share/pear/data
对具有“断开”路径的所有配置值执行此操作


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

我遇到了与此不同的问题,但您的解决方案帮助了我。谢谢。pear的安装有冲突,配置混乱,指向错误的位置。此外,执行诸如phpunit之类的扩展所需的文件不在要从命令行使用的bin中。不管怎么说,这帮了我的忙,现在我的安装已经完成。我猜当您同时在php中构建mamp、zend服务器和OSX时,就会发生这种情况。