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

Ben*_*san 6 php phing installation pear propel

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

pear channel-discover pear.phing.info
pear install phing/phing
pear install Log
Run Code Online (Sandbox Code Playgroud)

但是,当我./propel-gen按照Propel文档中的描述运行时,它失败并显示错误:

./propel-gen: line 69: phing: command not found
Run Code Online (Sandbox Code Playgroud)

但是,如果我检查是否安装了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
Run Code Online (Sandbox Code Playgroud)

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

<?php
    require_once 'System.php';
    var_dump(class_exists('System', false));
?> 
Run Code Online (Sandbox Code Playgroud)

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

cwe*_*ske 10

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

找到路径

$ pear config-get bin_dir
Run Code Online (Sandbox Code Playgroud)

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

$ export PATH=$PATH:/usr/share/php/bin
Run Code Online (Sandbox Code Playgroud)