Sudo Pecl Command Not Found

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

2

4 Answers

Fire up a terminal and use:

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

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

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

check your enviroment variable. /etc/environment. it should be like that PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest