安装pear及其组件

来源:互联网 发布:干部网络考试答案 编辑:程序博客网 时间:2024/05/17 09:25

找到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可看见


0 0