安装Composer-内部错误 [英] Installing Composer - Internal Error

查看:122
本文介绍了安装Composer-内部错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装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 .

composer未安装在Windows 7中

我发现了问题,并成功在Windows 10 PC中安装了Composer.

我在这里分享两个解决方案.

I am sharing two solutions here.

您必须执行一些步骤才能解决您的问题.

第一个解决方案.

  1. 查找并打开位于您"php"文件夹中的php.ini在我的情况下,该文件位于xampp中,文件位于c:\xampp\php\
  2. 找到"extension=php_openssl.dll"
  3. ";extension=php_openssl.dll" 通过删除分号取消注释 ";"
  4. 重新启动xampp,现在应该在此之后加载扩展名.
  5. 立即重试,您就可以安装作曲家了.
  1. Find and Open php.ini located in your "php" folder In my case it is in xampp the file is in c:\xampp\php\
  2. Find "extension=php_openssl.dll"
  3. ";extension=php_openssl.dll" uncomment by removing the semicolon ";"
  4. Restart your xampp , now extension should be loaded after that.
  5. Try again now you are able to install composer.

第二种解决方案(如果上述解决方案对您不起作用,请选择以下一种.)

这对我而言有效

  1. 查找并打开位于您"php"文件夹中的php.ini在我的情况下,该文件位于xampp中,文件位于c:\xampp\php\
  2. 通过单击Shell按钮从Xampp启动面板中打开SHELL.
  3. 在外壳中写入php并按Enter键
  4. 如果您的外壳中收到一些警告消息,如下图所示:
  5. 然后,您必须通过注释php.ini文件中的所有这些扩展名来修复这些警告消息.(实际上,引起这些警告消息的原因是多次启用了这些扩展名,但是您可以取消-comment (在php.ini文件中解决该问题).

  1. Find and Open php.ini located in your "php" folder In my case it is in xampp the file is in c:\xampp\php\
  2. Open SHELL from Xampp start panel by clicking on shell button.
  3. Write php in shell and hit enter
  4. If you get some warning message in your shell that looks like the image below:
  5. 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 in php.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

如果每个扩展名都具有多个警告,请按照上述步骤进行操作,直到在外壳中未收到任何警告消息为止.

  1. 重新启动xampp,现在应该在此之后加载扩展名.
  2. 立即重试,您就可以安装作曲家了.

希望我能解决您的问题.

就这些.编码愉快! (amitamie.com):-);-)

这篇关于安装Composer-内部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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