sudo: pecl7.2-sp: command not found
Asked Answered
A

2

7

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.

Auxiliaries answered 29/8, 2018 at 13:30 Comment(0)
C
15

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.

Croaker answered 22/9, 2018 at 11:49 Comment(3)
Craig, After using your given commands its works for me also.Auxiliaries
Getting error when executing "sudo apt-get install php-pear php-dev" "Package php-pear is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package php-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source"Doctorate
I get the same error as in previous comment.Brotherinlaw
G
4

I had to install imagick for php7.3 so I was getting same error using command like this

sudo pecl7.2-sp install imagick

What worked for me is running the command like this

pecl -d php_suffix=7.3 install -f imagick
Garrote answered 6/4, 2021 at 7:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.