php - 如何在 Ubuntu 16.04 中安装 php-curl

升级到 Ubuntu 16.04 并在安装 PHP5 后遇到问题。

安装了以下 PHP-5:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5.5   # for PHP 5.5

正在尝试安装 php-curl 但它不起作用。

sudo apt-get install php5-curl

Error: E: Unable to locate package php5-curl

最佳答案

在Ubuntu 16.04中默认的PHP版本是7.0,如果要使用不同的版本则需要根据PHP版本安装PHP包:

  • PHP 7.4:sudo apt-get install php7.4-curl
  • PHP 7.3:sudo apt-get install php7.3-curl
  • PHP 7.2:sudo apt-get install php7.2-curl
  • PHP 7.1:sudo apt-get install php7.1-curl
  • PHP 7.0:sudo apt-get install php7.0-curl
  • PHP 5.6:sudo apt-get install php5.6-curl
  • PHP 5.5:sudo apt-get install php5.5-curl

https://stackoverflow.com/questions/62636038/

相关文章:

amazon-web-services - server.servlet.context-path

r - 控制 geom_line() 图表中的日期(x 轴)间隔

python - 如何从不同的文件调用方法而不在python中导入它

reactjs - 如何使用 react-email-editor 加载 HTML 模板而不是 js

flutter - 如何解决 PlatformException (PlatformExceptio

swift - 达到最大时间戳计数,不会记录更多事件 Xcode

c - 尝试在 bmp 文件中画线时如何在 C 中实现 Bresenham 的线算法?

google-chrome - 报告 api : Is there a way to debug w

python - 如何在 Tkinter 窗口上使用 for 循环创建多个框架?

asp.net - 如何为网络浏览器的用户获取 AD 属性