farazch
farazch

Reputation: 21

How to add curl on php7.2 and ubuntu 14

I am trying to install curl on my ubunutu 14 server with php 7.2 installed. I run the following command:

sudo apt-get install php7.0-curl

but it gives error:

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package php7.0-curl

E: Couldn't find any package by regex 'php7.0-curl'

I then tried to resolve this issue by running commands:

sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt install apache2 libapache2-mod-php7.0 php7.0

But that also end up with same "Couldn't find package" error.

Upvotes: 1

Views: 1381

Answers (2)

Mike Doe
Mike Doe

Reputation: 17586

Your Ubuntu distro trusty is too old and those packages aren't available. You will have to build the library from the source by yourself.

Upvotes: 1

potiev
potiev

Reputation: 586

Here you can find solution your problem How do I install the ext-curl extension with PHP 7?

Shortly, try to execute

sudo apt-get install php-curl

Also you can use sudo apt-cache search curl which shows you available packages for installation.

Upvotes: 0

Related Questions