phing安装但“未找到”,而不是在梨列表中

时间:2011-11-01 12:53:35

标签: php installation pear propel phing

我正在尝试在CentOS上安装Propel ORM,它依赖于phing。我运行了以下成功的事情:

pear channel-discover pear.phing.info
pear install phing/phing
pear install Log

但是当我按Propel documentation所述运行./propel-gen时,它失败并显示错误:

./propel-gen: line 69: phing: command not found

但是,如果我检查是否安装了phing,它就不会出现在包列表中,但如果我再次尝试安装,则会失败:

$ pear list
Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.8   stable
Console_Getopt   1.3.1   stable
Log              1.12.7  stable
PEAR             1.9.4   stable
Structures_Graph 1.0.4   stable
XML_Util         1.2.1   stable

$ pear install phing/phing
phing/phing is already installed and is the same as the released version 2.4.7.1 install failed

我需要能够运行./propel-gen来测试Propel是否已经成功安装,所以我现在有点卡住了。我还通过运行退出include_path的以下内容,仔细检查了Pear是否在PHP bool(true)中:

<?php
    require_once 'System.php';
    var_dump(class_exists('System', false));
?> 

任何有关调试和帮助的帮助修复这一点非常感谢! :)

1 个答案:

答案 0 :(得分:10)

您需要在$PATH变量中包含pear的bin(可执行文件)目录。

使用

查找路径
$ pear config-get bin_dir

以这种方式将其添加到您的路径中:

$ export PATH=$PATH:/usr/share/php/bin
相关问题