1

I tried to install the CURL in my server but failed. My server is running in Ubuntu 18.04 LTS & PHP 7.2 version. I used the command to install the CURL in my server.

The command I used:

  1. sudo apt-get install curl
  2. sudo service apache2 restart I restart my server using this command
  3. sudo apt-get install php7.2-curl
  4. sudo service apache2 restart Again I restarted my server.

But after this nothing works. The CURL Command is not executing.

curl https://api.example.com/foo/foo/

The output is nothing, Is there any way to install the CURL which is compatible with PHP7.2 version.

1
  • I followed this article, Now I enabled the CURL in the latest version of PHP7.2 Jul 23, 2019 at 20:19

2 Answers 2

1

Need to use the following commands:

  1. sudo add-apt-repository ppa:ondrej/php
  2. sudo apt update
  3. sudo apt install php7.2-fpm php7.2-gd php7.2-curl php7.2-mysql php7.2-dev php7.2-cli php7.2-common php7.2-mbstring php7.2-intl php7.2-zip php7.2-bcmath

Then need to restart my server.

1

I tried this and it worked for me!

$ sudo apt-get install curl
$ sudo apt update
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt install php7.2-curl php7.2-mysql php7.2-dev php7.2-cli php7.2-intl
$ sudo service apache2 restart

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .