如何使用 PHP 7 安装 ext-curl 扩展? [英] How do I install the ext-curl extension with PHP 7?
本文介绍了如何使用 PHP 7 安装 ext-curl 扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用 这个 repo 安装了 PHP 7,但是当我尝试运行 composer install
,它给出了这个错误:
I've installed PHP 7 using this repo, but when I try to run composer install
, it's giving this error:
- [package] requires ext-curl * -> 您的系统中缺少请求的 PHP 扩展 curl.
使用 PHP 5,您可以通过运行 yum
或 apt-get install php5-curl
命令轻松安装它,但我找不到如何安装PHP 7 等效.
With PHP 5, you can easily install it by running the yum
or apt-get install php5-curl
command, but I can't find how to install the PHP 7 equivalent.
如何为 PHP 7 安装 ext-curl?
How do I install ext-curl for PHP 7?
推荐答案
好吧,我能够通过以下方式安装它:
Well I was able to install it by :
sudo apt-get install php-curl
在我的系统上.这将安装一个依赖包,依赖于默认的 php 版本.
on my system. This will install a dependency package, which depends on the default php version.
之后重启apache
sudo service apache2 restart
这篇关于如何使用 PHP 7 安装 ext-curl 扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文