Composer更新:缺少所请求的PHP扩展ext-http [英] Composer update: The requested PHP extension ext-http missing

查看:3123
本文介绍了Composer更新:缺少所请求的PHP扩展ext-http的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用symfony框架和作曲家创建一个php网站.

I am creating a php website using the symfony framework and composer.

  • 操作系统:Windows 10
  • PHP版本:7.3.2
  • Symfony:4.2.3(环境:dev,调试:true)
  • 作曲者:1.8.4(2019-02-11)

当我尝试在项目文件夹中执行compose update时,或者尝试使用composer require symfony/swiftmailer-bundle安装捆绑软件时,出现以下错误:

When I try to do compose update inside the projects folder or when I try to install a bundle using composer require symfony/swiftmailer-bundle I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-http * is missing from your system.
      Install or enable PHP's http extension.

(它说问题1",但这是列出的唯一问题.)

(It says 'Problem 1', but it is the only problem listed.)

我已经在php.ini文件中寻找扩展名,但是找不到.我需要手动安装扩展程序吗?如果是这样,我在哪里可以找到它?

I already looked for the extension in my php.ini file, but I can't find it. Do I need to install an extension manually? If so, where can I find it?

提前谢谢!

推荐答案

找到了解决方案.由于某些原因,我的composer.json包含了"ext-http": "*".

The solution is found. For some reason my composer.json contained "ext-http": "*".

"require": {
    "ext-http": "*"
}

删除此行可解决此问题.我不知道为什么它包含"ext-http": "*",我也不完全理解为什么删除它可以解决问题. (是因为它正在寻找扩展名,但找不到它吗?)

Removing this line fixed the problem. I don't know why it contained "ext-http": "*" and I don't fully understand why removing it would fix the problem. (Is it because it is looking for the extension, but can not find it?)

(谢谢所有试图帮助我解决问题的人!)

(Thank you to everyone trying to help me fix the problem!)

这篇关于Composer更新:缺少所请求的PHP扩展ext-http的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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