如何使用 yum 轻松地为 PHP 添加 posix 支持?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1008436/
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
How does one easily add posix support to PHP using yum?
提问by Kyle
I am running CentOS 5.2 and using yum to manage packages. I have had little luck installing php-posix but know with almost 100% certitude that it is a real and available package...somewhere. Has anyone had luck installing it?
我正在运行 CentOS 5.2 并使用 yum 来管理软件包。我在安装 php-posix 时运气不佳,但我几乎 100% 确信它是一个真实可用的软件包......在某处。有没有人有幸安装它?
FWIW, I am using the following:
FWIW,我正在使用以下内容:
sudo yum install -y php-posix
sudo yum install -y php-posix
Update:I've realized that this may be an issue with my host (Slicehost) as I do in fact have cli, posix, and pcntl enabled for my PHP version (5.2.9)
更新:我意识到这可能是我的主机 (Slicehost) 的问题,因为我确实为我的 PHP 版本 (5.2.9) 启用了 cli、posix 和 pcntl
采纳答案by ólafur Waage
You can try and see if it's in the testing repository.
您可以尝试查看它是否在测试存储库中。
To see if it's in that repository.
查看它是否在该存储库中。
yum --disablerepo=\* --enablerepo=c5-testing list available \*php\*
And to install it.
并安装它。
yum --enablerepo=c5-testing install php-posix
Be aware though, that the PHP version it needs may be higher than you currently have.
但请注意,它需要的 PHP 版本可能高于您当前拥有的版本。
回答by hlovdal
While the question was for centos, notice that for fedora the php-posixpackage is provided by php-processfrom fedora 11. I assume this change also will hit centos at some point.
虽然问题是针对 centos 的,但请注意,对于 fedora,该php-posix软件包是由php-processfedora 11提供的。我认为这种变化在某个时候也会影响到 centos。
回答by Pathic
This work for me where I have problem with symfony.
这对我有用,我对 symfony 有问题。
I Hope work for you. thanks
我希望为你工作。谢谢
回答by Tony Miller
I am running CentOS 5.3. The PHP that is included already has the Posix functions built in. You may or may not have found the introdctory documentation for the POSIX functions(which indicate that these functions are not available in Windows). Have you tried using a particular function and it didn't work?
我正在运行 CentOS 5.3。包含的 PHP 已经内置了 Posix 函数。您可能找到也可能没有找到POSIX 函数的介绍文档(这表明这些函数在 Windows 中不可用)。您是否尝试过使用特定功能但它不起作用?
<?php print_r(posix_uname()) ?>
in its own file works for me.
在它自己的文件中为我工作。

