使用 XAMPP 在 Windows 10 中安装 go-pear.phar 时出错 [英] Error installing go-pear.phar in Windows 10 with XAMPP

查看:49
本文介绍了使用 XAMPP 在 Windows 10 中安装 go-pear.phar 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试安装 go-pear.phar

这是错误,在对问题1-13, 'all' 或 Enter to continue 按 Enter 后:

This is the error, after hit Enter to the question 1-13, 'all' or Enter to continue:

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

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

I had PHP installed in my environment path as well. I did check with php --version and got the message

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.但我一直被困在上面的错误中.

So I proceed to install go-pear.phar with the command. But I'm keep being stuck in error above.

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.

推荐答案

我也遇到了这个问题,经过多次不同的尝试,我终于成功了.

I ran into this issue as well, and after many different attempts I finally got it to work by.

打开命令提示符

cd \xampp\php

cd \xampp\php

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

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

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

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

以下是为您的新 PEAR 安装建议的文件布局.到更改个别位置,在前面输入数字目录.键入all"以更改所有内容或只需按 Enter 即可接受这些位置.

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. 安装库($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. 公共网络文件目录:C:\xampp\php\www
  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
  1. 系统手册页目录:C:\xampp\php\man
  2. 测试目录:C:\xampp\php\tests
  3. 配置文件名称:C:\WINDOWS\pear.ini
  4. CLI php.exe 的路径:

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

1-13, 'all' or Enter to continue: 13

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

which pops up a windows Browse for Files or Folders

Windows 浏览文件或文件夹

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

select the folder C:\xampp\php not the file php.exe then select "OK"

然后你得到

找到 php.exe (sapi: cli).

php.exe (sapi: cli) found.

以下是为您的新 PEAR 安装建议的文件布局.到更改个别位置,在前面输入数字目录.键入all"以更改所有内容或只需按 Enter 即可接受这些位置.

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. 安装库($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. 公共网络文件目录:C:\xampp\php\www
  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
  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]

1-13, 'all' or Enter to continue: [Enter]

按回车键,你会得到

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

Beginning install... Configuration written to C:\WINDOWS\pear.ini... Initialized registry... Preparing to install...

我什至尝试在文件夹中手动输入 C:\xampp\php\ 之前,因为它在选择它后列出,但它继续出现错误.但在窗口中选择文件夹有效.

I even tried just typing in the folder manually as C:\xampp\php\ before, as it lists after selecting it, but it continues with the error. But selecting the folder in the window works.

这篇关于使用 XAMPP 在 Windows 10 中安装 go-pear.phar 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆