简体   繁体   English

安装PHP PEAR ubuntu 12.04时出错

[英]Error installing PHP PEAR ubuntu 12.04

I have installed PHP PEAR in ubuntu using 我在ubuntu中安装了PHP PEAR

sudo apt-get install php-pear

After successfull installation first time.When I try to run it in terminal , it shows error: 第一次成功安装后。当我尝试在终端中运行它时,它显示错误:

The program 'pear' is currently not installed.  You can install it by typing:
sudo apt-get install php-pear

I again tried to install it. 我再次尝试安装它。 Then it shows that 然后它显示了

php-pear is already the newest version.

I have checked many questions on SO. 我已经检查了很多关于SO的问题。 In every question it is mentioned to locate pear etc. But above mentioned error is not solved. 在每一个问题中都提到了定位梨等。但是上面提到的错误并没有解决。

I even tried installing pear many times with sudo and running it. 我甚至尝试用sudo多次安装pear并运行它。 It gives same error. 它给出了同样的错误。

Please help to sort it out. 请帮忙整理一下。

Package php-pear in Ubuntu 12.04 only works with PHP <= 5.2 在Ubuntu 12.04中打包php-pear只适用于PHP <= 5.2

For PHP >= 5.3 use 对于PHP> = 5.3使用

wget http://pear.php.net/go-pear.phar
php go-pear.phar

Just remove PEAR and PHP, then start from the beginning. 只需删除PEAR和PHP,然后从头开始。 I hope this solves your problem. 我希望这能解决你的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM