phing installed but “not found” and not in pear list

喜你入骨 提交于 2019-11-30 04:48:25

问题


I'm attempting to install the Propel ORM on CentOS which has a dependency for phing. I've run the following which was succesful:

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

However when I run ./propel-gen as is described on the Propel documentation it fails with the error:

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

However if I check to see if phing is installed it doesn't appear in the package list, yet if I try to install it again it fails:

$ 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

I need to be able to run ./propel-gen to test that Propel has been installed successfully, so I'm a little stuck at this point. I've also double checked that Pear is in the PHP include_path by running the following which exits bool(true):

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

Any help in debugging & fixing this is greatly appreciated! :)


回答1:


You need to have pear's bin (executable) directory in your $PATH variable.

Find the path with

$ pear config-get bin_dir

Add this to your path that way:

$ export PATH=$PATH:/usr/share/php/bin


来源:https://stackoverflow.com/questions/7966759/phing-installed-but-not-found-and-not-in-pear-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!