Windows安装PECL

Tony哥
2022-09-16 / 1 评论 / 1,025 阅读 / 正在检测是否收录...

安装步骤

PECL是 The PHP Extension Community Library 缩写。

下载go-pear.phar 到 d:/tool/go-pear.phar
执行 php d:/tool/go-pear.phar
下载地址:http://pear.php.net/go-pear.phar
官方文档:https://pear.php.net/manual/en/installation.getting.php

关键事项

注意事项:第一个一定是选择 local。
第一次执行的时候一定要指定 php的路径,输入13弹出对话框选择PHP的目录。
之后直接按 Enter 继续。完成!

安装过程

D:\pear>php d:/tool/go-pear.phar

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : local
Please confirm local copy by typing 'yes' : yes

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : D:\pear
 2. Temporary directory for processing            : D:\pear\tmp
 3. Temporary directory for downloads             : D:\pear\tmp
 4. Binaries directory                            : D:\pear
 5. PHP code directory ($php_dir)                 : D:\pear\pear
 6. Documentation directory                       : D:\pear\docs
 7. Data directory                                : D:\pear\data
 8. User-modifiable configuration files directory : D:\pear\cfg
 9. Public Web Files directory                    : D:\pear\www
10. System manual pages directory                 : D:\pear\man
11. Tests directory                               : D:\pear\tests
12. Name of configuration file                    : D:\pear\pear.ini
13. Path to CLI php.exe                           :

1-13, 'all' or Enter to continue: 13
php.exe (sapi: cli) found.



Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : D:\pear\
 2. Temporary directory for processing            : D:\pear\\tmp
 3. Temporary directory for downloads             : D:\pear\\tmp
 4. Binaries directory                            : D:\pear\
 5. PHP code directory ($php_dir)                 : D:\pear\\pear
 6. Documentation directory                       : D:\pear\\docs
 7. Data directory                                : D:\pear\\data
 8. User-modifiable configuration files directory : D:\pear\\cfg
 9. Public Web Files directory                    : D:\pear\\www
10. System manual pages directory                 : D:\pear\\man
11. Tests directory                               : D:\pear\\tests
12. Name of configuration file                    : D:\pear\\pear.ini
13. Path to CLI php.exe                           : D:\php73\

1-13, 'all' or Enter to continue:
Beginning install...
Configuration written to D:\pear\\pear.ini...
Initialized registry...
Preparing to install...
installing phar://D:/tool/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.4.7.t
ar...
installing phar://D:/tool/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.4.
2.tar...
installing phar://D:/tool/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.10.9.tar...
installing phar://D:/tool/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.
1.1.tar...
installing phar://D:/tool/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.4.3.tar.
..
install ok: channel://pear.php.net/Archive_Tar-1.4.7
install ok: channel://pear.php.net/Console_Getopt-1.4.2
install ok: channel://pear.php.net/Structures_Graph-1.1.1
install ok: channel://pear.php.net/XML_Util-1.4.3
install ok: channel://pear.php.net/PEAR-1.10.9
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)

PEAR: To install optional features use "pear install pear/PEAR#featurename"

******************************************************************************
WARNING!  The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
<D:\pear\\pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.


Would you like to alter php.ini <D:\PHP73\php.ini>? [Y/n] : Y

php.ini <D:\PHP73\php.ini> include_path updated.

Current include path           : .;C:\php\pear
Configured directory           : D:\pear\\pear
Currently used php.ini (guess) : D:\PHP73\php.ini
Press Enter to continue:

** WARNING! Old version found at C:\Program Files (x86)\Common Files\Oracle\Java
\javapath\pear.bat, please remove it or be sure to use the new d:\pear\\pear.bat
 command

The 'pear' command is now at your service at d:\pear\\pear.bat

** The 'pear' command is not currently in your PATH, so you need to
** use 'd:\pear\\pear.bat' until you have added
** 'D:\pear\' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

  http://pear.php.net/faq.php
  http://pear.php.net/manual/

Thanks for using go-pear!
0

评论 (1)

取消
  1. 头像
    aaa
    Windows 10 · Google Chrome

    安装完怎么使用 提示没有这个命令啊

    回复