pecl:command not found

和自甴很熟 提交于 2019-12-04 16:20:53

问题


I'm trying to run the following command in terminal on my macbook pro

cd /tmp; pecl download memcached

but im getting

pecl:command not found.

after a days googling I cant find out whats up. Does anyone have a solution?


回答1:


At least on Arch Linux you must install php-pear package for the pecl tool by using this command:

pacman -S php-pear



回答2:


apt-get update

apt-get install php-pear php5-dev



回答3:


I know, old post but for anyone else.

On Windows PECL and PEAR commands are not found but they are pre-installed in PHP.

They are not in the windows path so you have to cd into the PEAR directory to run the command or add the PEAR directory to your systems path variable

There is a .bat file in the PEAR directory which is supposed to do this for you if you double click it but it did not work for me on win7 so I manually add the path or just cd to the directory to run it




回答4:


Old thread but might be useful for someone... On OSX with MAMP installed its best to find out which version of php installed (from the /Applications/MAMP/bin/php/* directory).

Then either temporarily

export PATH=/Applications/MAMP/bin/php/php5.5.3/bin:$PATH

or permanently

echo "export PATH=/Applications/MAMP/bin/php/php5.5.3/bin:$PATH" >> ~/.profile

then

which pecl

then tells you, e.g.

/Applications/MAMP/bin/php/php5.5.3/bin/pecl


来源:https://stackoverflow.com/questions/1625161/peclcommand-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!