安装Composer-内部错误 [英] Installing Composer - Internal Error
问题描述
我在安装Composer
时遇到问题.在向导中选择php.exe
路径后,接下来显示的是以下错误描述.
I have trouble installing Composer
. After I select the php.exe
path in the wizard and next thing it shows is the below error description.
您指定的PHP exe文件未正确执行: D:\ wamp \ bin \ php \ php5.5.12 \ php.exe从命令行运行 可能会突出问题.内部错误[ERR_INVALID],退出代码1
The PHP exe file you specified did not execute correctly: D:\wamp\bin\php\php5.5.12\php.exe Running it from the command line might highlight the problem. Internal Error [ERR_INVALID], exit code 1
推荐答案
我想这是一个在这里被问到的问题.
I guess this is a problem which had been asked here .
我发现了问题,并成功在Windows 10 PC中安装了Composer.
我在这里分享两个解决方案.
I am sharing two solutions here.
您必须执行一些步骤才能解决您的问题.
第一个解决方案.
- 查找并打开位于您"php"文件夹中的
php.ini
在我的情况下,该文件位于xampp中,文件位于c:\xampp\php\
中
- 找到
"extension=php_openssl.dll"
-
";extension=php_openssl.dll"
通过删除分号取消注释";"
- 重新启动xampp,现在应该在此之后加载扩展名.
- 立即重试,您就可以安装作曲家了.
- Find and Open
php.ini
located in your "php" folder In my case it is in xampp the file is inc:\xampp\php\
- Find
"extension=php_openssl.dll"
";extension=php_openssl.dll"
uncomment by removing the semicolon";"
- Restart your xampp , now extension should be loaded after that.
- Try again now you are able to install composer.
第二种解决方案(如果上述解决方案对您不起作用,请选择以下一种.)
这对我而言有效
- 查找并打开位于您"php"文件夹中的
php.ini
在我的情况下,该文件位于xampp中,文件位于c:\xampp\php\
中
- 通过单击Shell按钮从Xampp启动面板中打开SHELL.
- 在外壳中写入
php
并按Enter键 - 如果您的外壳中收到一些警告消息,如下图所示:
-
然后,您必须通过注释
php.ini
文件中的所有这些扩展名来修复这些警告消息.(实际上,引起这些警告消息的原因是多次启用了这些扩展名,但是您可以取消-comment (在php.ini
文件中解决该问题).
- Find and Open
php.ini
located in your "php" folder In my case it is in xampp the file is inc:\xampp\php\
- Open SHELL from Xampp start panel by clicking on shell button.
- Write
php
in shell and hit enter - If you get some warning message in your shell that looks like the image below:
Then you have to fix these warning message by commenting all these extension in your
php.ini
file.(Actually cause of these warning messages are because more than one time these extensions are enabled but you can un-comment it inphp.ini
file to solve the issue).
以我的情况为例.
a).您可以在上图中看到卷曲的警告消息.
a). You can see in above image there is warning message for curl.
Module 'curl' already loaded in Unknown on line 0 .
b)要修复此问题,请在您的php.ini
文件中找到php_curl.dll
文件,并通过在该扩展名前面添加分号 ";"
来注释该扩展名,例如;extension=php_curl.dll
b) To fix this find php_curl.dll
file in your php.ini
file and comment that extension by adding semicolon ";"
in front of that extension like this ;extension=php_curl.dll
如果每个扩展名都具有多个警告,请按照上述步骤进行操作,直到在外壳中未收到任何警告消息为止.
- 重新启动xampp,现在应该在此之后加载扩展名.
- 立即重试,您就可以安装作曲家了.
希望我能解决您的问题.
就这些.编码愉快! (amitamie.com):-);-)
这篇关于安装Composer-内部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!