Linux yum 在 centos 上安装 php-pear*

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2119195/
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-03 19:43:09  来源:igfitidea点击:

yum install php-pear* on centos

phplinuxcentospearyum

提问by Haluk

I'm trying to install pear on my centos.

我正在尝试在我的 centos 上安装 pear。

I've used "*yum install php-pear**" to install pear and it seemed to install with success. No errors. I restart my server.

我已经使用“*yum install php-pear**”来安装 pear,它似乎安装成功。没有错误。我重新启动我的服务器。

However when I check out phpinfo(). I see that my php is still built using "--without-pear".

但是,当我查看 phpinfo() 时。我看到我的 php 仍然使用“ --without-pear”构建。

Isn't yum supposed to rebuild my php with pear? What would be possibly going wrong?

yum 不是应该用 pear 重建我的 php 吗?可能会出什么问题?

Thanks!

谢谢!

采纳答案by kguest

Try something like

尝试类似的东西

$ pear list

and

$ pear info PEAR

- now if you get a listing of installed packages in the first case and information on what version of pear is installed in the second you're ready to use it.

- 现在,如果您在第一种情况下获得已安装软件包的列表以及有关在第二种情况下安装的 pear 版本的信息,您就可以使用它了。

回答by Phill Pafford

You might still need to configure PEAR, did you check the PEAR site?

您可能仍然需要配置 PEAR,您是否查看了PEAR 站点

回答by Ignacio Vazquez-Abrams

The output of phpinfo()is correct; the binary wasbuilt without PEAR. Fortunately what it says there doesn't matter. Look into the sections below to see what is currently available.

的输出phpinfo()是正确的;二进制文件在没有 PEAR 的情况下构建的。幸运的是,它所说的并不重要。查看以下部分以了解当前可用的内容。

回答by futureelite7

yum does not rebuild anything. It downloads the necessary software modules and installs it on your machine. Your stock centos php does not have pear pre-compiled, but it will still be able to use pear once you've downloaded your modules.

yum 不重建任何东西。它会下载必要的软件模块并将其安装在您的机器上。您的库存 centos php 没有预编译 pear,但是一旦您下载了模块,它仍然可以使用 pear。

If you cannot run pear, make sure you have the executable included in your path, or use "locate" to find it.

如果您无法运行 pear,请确保您的路径中包含可执行文件,或者使用“locate”来查找它。

回答by Prashant Verma

Resolved, I have installed the given packages and restarted the server.

解决了,我已经安装了给定的软件包并重新启动了服务器。

Try this yum install php-pear php-gd php-pear-DB -y service httpd restart.

试试这个 yum install php-pear php-gd php-pear-DB -y service httpd restart。

it works

有用