繁体   English   中英

使用 XAMPP 在 Windows 10 中安装 go-pear.phar 时出错

[英]Error installing go-pear.phar in Windows 10 with XAMPP

尝试安装go-pear.phar时总是出错

这是错误,在问题 1-13 中Enter1-13, 'all' or Enter to continue:

1-13, 'all' or Enter to continue:
**ERROR**
Please, enter the php.exe path.

我的环境路径中也安装了 PHP。 我确实检查了php --version并收到了消息

C:\xampp\php>php --version
PHP 7.2.31 (cli) (built: May 12 2020 10:26:32) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

所以我继续使用命令安装go-pear.phar 但我一直被困在上面的错误中。

C:\xampp\php>php go-pear.phar

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] :

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

1-13, 'all' or Enter to continue:
**ERROR**
Please, enter the php.exe path.

我也遇到了这个问题,经过多次不同的尝试,我终于解决了这个问题。

打开命令提示符

光盘\xampp\php

C:\xampp\php\php go-pear.phar

您是安装系统范围的 PEAR 还是本地副本? (系统|本地)[系统]:

以下是新 PEAR 安装的建议文件布局。 要更改个别位置,请键入目录前面的数字。 键入“all”以更改所有位置,或直接按 Enter 接受这些位置。

  1. 安装基础($前缀):C:\xampp\php
  2. 加工临时目录:C:\xampp\php\tmp
  3. 下载临时目录:C:\xampp\php\tmp
  4. 二进制文件目录:C:\xampp\php
  5. PHP 代码目录($php_dir):C:\xampp\php\pear
  6. 文档目录:C:\xampp\php\docs
  7. 数据目录:C:\xampp\php\data
  8. 用户可修改的配置文件目录:C:\xampp\php\cfg
  9. 公共 Web 文件目录:C:\xampp\php\www
    1. 系统手册页目录:C:\xampp\php\man
    2. 测试目录:C:\xampp\php\tests
    3. 配置文件名:C:\WINDOWS\pear.ini
    4. CLI php.exe 的路径:

1-13, 'all' 或 Enter 继续: 13

弹出一个 windows 浏览文件或文件夹

Windows 浏览文件或文件夹

select 文件夹 C:\xampp\php 不是文件 php.exe 然后 Z9993289282F0401FEFE48

然后你得到

找到 php.exe (sapi: cli)。

以下是新 PEAR 安装的建议文件布局。 要更改个别位置,请键入目录前面的数字。 键入“all”以更改所有位置,或直接按 Enter 接受这些位置。

  1. 安装基础($前缀):C:\xampp\php
  2. 加工临时目录:C:\xampp\php\tmp
  3. 下载临时目录:C:\xampp\php\tmp
  4. 二进制文件目录:C:\xampp\php
  5. PHP 代码目录($php_dir):C:\xampp\php\pear
  6. 文档目录:C:\xampp\php\docs
  7. 数据目录:C:\xampp\php\data
  8. 用户可修改的配置文件目录:C:\xampp\php\cfg
  9. 公共 Web 文件目录:C:\xampp\php\www
    1. 系统手册页目录:C:\xampp\php\man
    2. 测试目录:C:\xampp\php\tests
    3. 配置文件名:C:\WINDOWS\pear.ini
    4. CLI php.exe 的路径:C:\xampp\php\

1-13, 'all' 或 Enter 继续:[Enter]

按回车键,你会得到

开始安装... 配置写入 C:\WINDOWS\pear.ini... 初始化注册表... 准备安装...

我什至尝试手动输入文件夹 C:\xampp\php\ 之前,因为它在选择它后列出,但它继续出现错误。 但是选择 window 中的文件夹是可行的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM