php 安装梨

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5428778/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 21:23:09  来源:igfitidea点击:

Installing PEAR

php

提问by shantanuo

phpinfo() function shows that my PHP version (5.1.6) is installed --without-pear in the configure command section.

phpinfo() 函数显示我的 PHP 版本 (5.1.6) 已安装 --without-pear 在配置命令部分。

How do I install pear?

我如何安装梨?

回答by Pascal MARTIN

The Getting and installing the PEAR package managerpage should help you : it gives informations on how to install the PEAR package manager, on both windows, Linux, and Mac.

获取并安装PEAR包管理器页面应该帮助你:它提供了有关如何安装PEAR包管理器,可以在Windows,Linux和Mac的信息。


Basically, if your Linux distribution comes with a PEAP package, you should install it.


基本上,如果您的 Linux 发行版带有 PEAP 包,您应该安装它。

For instance, on Ubuntu1, there is a php-pearpackage ; so, you'd use :

例如,在 Ubuntu 1 上,有一个php-pear包;所以,你会使用:

apt-get install php-pear


Else, if it doesn't, with a version of PHP >= 5.3, you should be able to use this :


否则,如果没有,使用PHP >= 5.3版本,您应该可以使用它:

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

With PHP 5.1, though, this is not going to work, as phar support has been added in PHP 5.3...

但是,对于 PHP 5.1,这是行不通的,因为 PHP 5.3 中添加了 phar 支持......


As a sidenote : PHP 5.1 is really outdated!


作为旁注:PHP 5.1 真的已经过时了

PHP 5.3 is more than one year and a half old ; even PHP 5.2 is not maintained anymore... maybe you should consider upgrading ?

PHP 5.3 已经一年半多了;甚至 PHP 5.2 也不再维护......也许你应该考虑升级?


1It seems you are running some kind of Redhat-based distribution, but I don't have one of those, so I cannot say if there is a PEAR package for it -- there is probably one, though.


1似乎您正在运行某种基于 Redhat 的发行版,但我没有其中之一,所以我不能说是否有一个 PEAR 包——不过可能有一个。

回答by Charles

--without-pearonlymeans that the PEAR bits were not immediately createdwhen PHP was compiled.

--without-pearonly意味着在编译 PHP 时不会立即创建PEAR 位。

This usually happens when an operating system vendor that provides packages and wants to split off bits and pieces into their own individually installable parts.

这通常发生在提供软件包的操作系统供应商并希望将零碎的部分拆分为他们自己的可单独安装的部分时。

Given the age of the PHP you're talking about, you're probably on RHEL or a derivative like CentOS. Check the package manager for a php-pearpackage.

鉴于您所谈论的 PHP 的年龄,您可能使用的是 RHEL 或 CentOS 之类的衍生产品。检查包管理器中的php-pear包。