sudo: pecl7.2-sp: command not found

Rahul Gaikwad picture Rahul Gaikwad · Aug 29, 2018 · Viewed 21.5k times · Source

I need to install GeoIP on PHP 7.2 . For this I am using following commands -

sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install libgeoip-dev
sudo pecl7.2-sp install geoip-beta

Top two commands are run successfully, But while running the third on I am getting following error -

sudo: pecl7.2-sp: command not found

Any suggestion, How can I install pecl on php 7.2 or any other way to install GeoIP on php 7.2.

Answer

CPP picture CPP · Sep 22, 2018

I am on ubuntu 16:04 and the following got it working for me (more or less):

Run the following command:

sudo apt-get install php-pear php-dev

Now you can run the command pecl instead pecl7.2-sp - seems to work fine though:

sudo pecl install geoip-beta

Hope that helps.