安装pear及其组件

在安装PEAR及组件如Mail时遇到错误,由于Structures/Graph.php缺失导致安装失败。解决方法是手动下载Structures_Graph-1.0.4.tgz并将其解压到pear目录,然后通过pear install进行安装。同样方法处理Mail等其他组件的安装,成功后可通过pear list检查安装状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

找到wamp中的go-pear.bat,双击进行运行。因为pear存在bug,可能会出错。

打开dos命令进php安装目录输入php -d phar.require_hash=0 PEAR/go-pear.phar点击回车,按照提示一路进行安装成功

打开dos命令进入php安装目录,安装pear install Mail,发现报错

Warning: require_once(Structures/Graph.php): failed to open stream: No such file

 or directory in PEAR\Downloader.php on line 1217

PHP Warning:  require_once(Structures/Graph.php): failed to open stream: No such

 file or directory in D:\wamp\bin\php\php5.3.5\PEAR\PEAR\Downloader.php on line

1217

PHP Stack trace:

PHP   1. {main}() D:\wamp\bin\php\php5.3.5\PEAR\pearcmd.php:0

PHP   2. PEAR_Command_Common->run() D:\wamp\bin\php\php5.3.5\PEAR\pearcmd.php:30

8

PHP   3. PEAR_Command_Install->doInstall() D:\wamp\bin\php\php5.3.5\PEAR\PEAR\Co

mmand\Common.php:271

PHP   4. PEAR_Downloader->sortPackagesForInstall() D:\wamp\bin\php\php5.3.5\PEAR

\PEAR\Command\Install.php:700

Warning: require_once(Structures/Graph.php): failed to open stream: No such file

 or directory in D:\wamp\bin\php\php5.3.5\PEAR\PEAR\Downloader.php on line 1217

 

上面的解决办法是将组件下载后放入pear的目录,直接对下载的文件进行安装

http://pear.php.net/package/Structures_Graph/download

下载Structures_Graph-1.0.4.tgz  的 Structurespear目录下如:d:/php/pear
然后运行  pear install Structures_Graph 安装安装更新

可将下载的Mail-1.2.0.tgzNet_SMTP-1.4.2.tgzNet_Socket-1.0.9.tgz拷贝到pear目录

然后使用peat install Net_Socket-1.0.9.tgz进行安装即可。安装成功后使用pear list可看见


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值