[英]Error installing go-pear.phar in Windows 10 with XAMPP
I am always getting an error while trying to install go-pear.phar
尝试安装
go-pear.phar
时总是出错
This is the error, after hit Enter
to the question 1-13, 'all' or Enter to continue:
这是错误,在问题 1-13 中
Enter
后1-13, 'all' or Enter to continue:
1-13, 'all' or Enter to continue:
**ERROR**
Please, enter the php.exe path.
I had PHP installed in my environment path as well.我的环境路径中也安装了 PHP。 I did check with
php --version
and got the message我确实检查了
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
So I proceed to install go-pear.phar
with the command.所以我继续使用命令安装
go-pear.phar
。 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.我也遇到了这个问题,经过多次不同的尝试,我终于解决了这个问题。
opening command prompt打开命令提示符
cd \xampp\php光盘\xampp\php
C:\xampp\php\php go-pear.phar C:\xampp\php\php go-pear.phar
Are you installing a system-wide PEAR or a local copy?您是安装系统范围的 PEAR 还是本地副本? (system|local) [system]:
(系统|本地)[系统]:
Below is a suggested file layout for your new PEAR installation.以下是新 PEAR 安装的建议文件布局。 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.
键入“all”以更改所有位置,或直接按 Enter 接受这些位置。
1-13, 'all' or Enter to continue: 13 1-13, 'all' 或 Enter 继续: 13
which pops up a windows Browse for Files or Folders弹出一个 windows 浏览文件或文件夹
Windows Browse for Files or Folders Windows 浏览文件或文件夹
select the folder C:\xampp\php not the file php.exe then select "OK" select 文件夹 C:\xampp\php 不是文件 php.exe 然后 Z9993289282F0401FEFE48
you then get然后你得到
php.exe (sapi: cli) found.找到 php.exe (sapi: cli)。
Below is a suggested file layout for your new PEAR installation.以下是新 PEAR 安装的建议文件布局。 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.
键入“all”以更改所有位置,或直接按 Enter 接受这些位置。
1-13, 'all' or Enter to continue: [Enter] 1-13, 'all' 或 Enter 继续:[Enter]
hit the enter key and you will get按回车键,你会得到
Beginning install... Configuration written to C:\WINDOWS\pear.ini... Initialized registry... Preparing to install...开始安装... 配置写入 C:\WINDOWS\pear.ini... 初始化注册表... 准备安装...
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.我什至尝试手动输入文件夹 C:\xampp\php\ 之前,因为它在选择它后列出,但它继续出现错误。 But selecting the folder in the window works.
但是选择 window 中的文件夹是可行的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.