如何在Ubuntu 16.04中安装php-curl [英] How to install php-curl in ubuntu 16.04

查看:661
本文介绍了如何在Ubuntu 16.04中安装php-curl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有Updgrage 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 

输出:E:无法找到软件包php5-curl


<在Ubuntu 16.04中,默认PHP版本是7.0,如果我们想要你的diffrent版本,那么我们需要根据PHP版本安装PHP包:




  • PHP 7:sudo apt-get install php-curl

  • PHP 5.6:sudo apt -get install php5.6-curl

  • PHP 5.5:sudo apt-get install php5.5-curl


I've Updgrage ubuntu 16.04 and facing problems after installing PHP5.

Installed PHP-5 with following:

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

Try to install php-curl but its not working.

sudo apt-get install php5-curl

Output: E: Unable to locate package php5-curl

解决方案

In Ubuntu 16.04 default PHP version is 7.0, if we want to you diffrent version then we need to install PHP package according to PHP version:

  • PHP 7 : sudo apt-get install php-curl
  • PHP 5.6: sudo apt-get install php5.6-curl
  • PHP 5.5: sudo apt-get install php5.5-curl

这篇关于如何在Ubuntu 16.04中安装php-curl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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