sudo pecl command not found

41,576

Solution 1

Fire up a terminal and use:

sudo apt-get update
sudo apt-get install php-pear php5-dev

Solution 2

This is what I did.

I completely remove old packages using

sudo apt-get purge php-pear

Then installed pear using the following command

sudo apt-get install -f php-pear php5-dev

Now it works.

Thanks

Solution 3

The question is old but still valid. Im using php 7.4 with Ubuntu 20.04 but none of the above works for me

instead for php7.4 I executed the following commands at my terminal

sudo apt install php-dev php-pear

then you can run:

sudo pecl install mongodb

credit goes to https://www.php.net/manual/en/mongodb.installation.pecl.php#125027

Share:
41,576

Related videos on Youtube

PrivateUser
Author by

PrivateUser

Updated on September 18, 2022

Comments

  • PrivateUser
    PrivateUser almost 2 years

    I'm using ubuntu 12.04

    I installed php pear using this command

    sudo apt-get install php-pear php5-dev
    

    I got this results

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    php-pear is already the newest version.
    php5-dev is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    Now when I use this command

    sudo pecl install v8js-0.1.3
    

    I'm getting this error

    sudo: pecl: command not found
    

    Can someone tell me how to fix this error? Thankyou

    • SimplySimon
      SimplySimon almost 11 years
      sudo apt-get install -f php-pear php5-dev could possibly do it
  • PrivateUser
    PrivateUser almost 11 years
    I've done all the steps. But nothing works. I still getting that same message. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.