简体   繁体   English

在wamp的梨安装

[英]pear installation in wamp

I am running wamp 2.2 on windows 7. when I try to pear install phpunit/PHPUNIT . 我在Windows 7上运行wamp 2.2。当我尝试安装phpunit / PHPUNIT时 it shows some mkdir problem. 它显示了一些mkdir问题。 Then I try 然后我试试

pear config-set autodiscover 1

PEAR_Config::writeConfigfile fopen<'C:\\windows\\pear.ini','w'> faild<'C:\\windows\\pear.ini'>: failed to open stream: Permission denied PEAR_Config :: writeConfigfile fopen <'C:\\ windows \\ pear.ini','w'> faild <'C:\\ windows \\ pear.ini'>:无法打开流:权限被拒绝
Then I checked my pear.bat file. 然后我检查了我的pear.bat文件。 and I see some warning below, 我在下面看到一些警告,

REM launch pearcmd
GOTO RUN
:PEAR_INSTALL_ERROR
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_INSTALL_ERROR2
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO pearcmd.php could not be found there.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_BIN_ERROR
ECHO PHP_PEAR_BIN_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_BIN_DIR%
GOTO END
:PEAR_PHPBIN_ERROR
ECHO PHP_PEAR_PHP_BIN is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END

The installer is looking for your PEAR directory to be in the environment variable PHP_PEAR_INSTALL_DIR . 安装程序正在寻找您的PEAR目录在环境变量PHP_PEAR_INSTALL_DIR The instructions provided there say to go set your install directory in pear.bat or to set that environment variable. 这里提供的说明是在pear.bat中设置安装目录或设置该环境变量。

"failed to open stream: Permission denied" suggests that it is unable to write due to a lack of write permission. “未能打开流:权限被拒绝”表示由于缺少写入权限而无法写入。 I see that it is attempting to write to the windows folder and you're using windows 7. It is possible that UAC is blocking the write attempt. 我看到它正在尝试写入Windows文件夹而你正在使用Windows 7.UAC可能会阻止写入尝试。 If you have not tried running the batch file in a command windows with elevated permissions I suggest doing so. 如果您还没有尝试在具有提升权限的命令窗口中运行批处理文件,我建议这样做。

Right click on CMD > Run as Administrator 右键单击CMD>以管理员身份运行

Execute .bat file 执行.bat文件

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

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