安裝pear及其組件

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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章