gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 21:34:34 26 4
gpt4 key购买 nike

我在尝试安装 go-pear.phar 时总是遇到错误

这是错误,在按 Enter 到问题 1-13,'all' 或 Enter 继续:

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.

最佳答案

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

打开命令提示符

cd\xampp\php

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

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

下面是为您的新 PEAR 安装建议的文件布局。到更改个别位置,在前面键入数字目录。键入“all”更改所有这些或简单地按 Enter 键接受这些位置。

  1. 安装基础($prefix):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. 公共(public) 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,'全部'或回车继续:13

弹出窗口浏览文件或文件夹

Windows Browse for Files or Folders

选择文件夹 C:\xampp\php 而不是文件 php.exe 然后选择“确定”

然后你得到

找到 php.exe (sapi: cli)。

下面是为您的新 PEAR 安装建议的文件布局。到更改个别位置,在前面键入数字目录。键入“all”更改所有这些或简单地按 Enter 键接受这些位置。

  1. 安装基础($prefix):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. 公共(public) 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\之前,因为它在选择它之后列出,但它继续出现错误。但是在窗口中选择文件夹是可行的。

关于php - 使用 XAMPP 在 Windows 10 中安装 go-pear.phar 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62134934/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com