我正在尝试在 wampserver 中安装梨。它没有附带 go-pear.bat。
我从 pear.php.net/go-pear 下载 .phar 文件并运行 php go-pear.phar。
它只是不断循环我设置所有路径的配置。
是什么赋予了?
假设您正在运行 PHP5.3.24 并且 wamp 安装在 C: 驱动器上,如果没有相应地更改文件夹名称。
从http://pear.php.net/go-pear.phar获取 go-pear.phar 并将其复制到 wamp\bin\php\php5.3.24 文件夹
从 Windows 命令窗口执行所有这些操作
cd C:\wamp\bin\php\php5.3.24
md pear
PATH=%PATH%;C:\wamp\bin\php\php5.3.24
php go-pear.phar
当你被问到这个问题时
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:\wamp\bin\php\php5.3.24
2. Temporary directory for processing : D:\wamp\bin\php\php5.3.24\tmp
3. Temporary directory for downloads : D:\wamp\bin\php\php5.3.24\tmp
4. Binaries directory : D:\wamp\bin\php\php5.3.24
5. PHP code directory ($php_dir) : D:\wamp\bin\php\php5.3.24\pear
6. Documentation directory : D:\wamp\bin\php\php5.3.24\docs
7. Data directory : D:\wamp\bin\php\php5.3.24\data
8. User-modifiable configuration files directory : D:\wamp\bin\php\php5.3.24\cfg
9. Public Web Files directory : D:\wamp\bin\php\php5.3.24\www
10. Tests directory : D:\wamp\bin\php\php5.3.24\tests
11. Name of configuration file : D:\wamp\bin\php\php5.3.24\pear.ini
12. Path to CLI php.exe : \wamp\bin\php\php5.3.24
1-12, 'all' or Enter to continue: 12
要让它继续安装,您只需按下 ENTER 键
就这么简单
我遇到了同样的问题,如果您向后滚动一点,您应该会看到一个错误,可能是您没有php.exe folder
正确填写 ( number 12
)。只需键入12
,按下enter
并导航到您的 PHP 安装文件夹(如C:/php
)。然后,点击后enter
,安装应该开始。
local
运行后输入php go-pear.phar
。
然后按照佩德罗洛比托所说的去做。
如果列表再次显示,只需按下Enter
并开始安装。