我已经使用
在ubuntu中安装了PHP PEARsudo apt-get install php-pear
第一次成功安装后。当我尝试在终端中运行它时,显示错误:
The program 'pear' is currently not installed. You can install it by typing:
sudo apt-get install php-pear
我再次尝试安装它。然后它显示
php-pear is already the newest version.
我已经检查了很多关于SO的问题。在每一个问题中都提到了定位梨等。但是上面提到的错误并没有解决。
我甚至尝试用sudo多次安装pear并运行它。它给出了同样的错误。
请帮忙解决。
答案 0 :(得分:7)
在Ubuntu 12.04中打包php-pear只适用于PHP< = 5.2
对于PHP> = 5.3使用
wget http://pear.php.net/go-pear.phar
php go-pear.phar
答案 1 :(得分:1)
只需删除PEAR和PHP,然后从头开始。我希望这能解决你的问题。