简体   繁体   English

在RHEL6上安装php-devel(PHP 5.3.3)

[英]installing php-devel on RHEL6 (PHP 5.3.3)

I'm trying in vain to get the php oci_* extensions installed on our server, but i've hit a brick wall. 我试图在我们的服务器上安装php oci_ *扩展程序是徒劳的,但我已经碰到了一堵砖墙。

So far i've done this: 到目前为止我已经这样做了:

  • Installed oracle basic & devel libraries (v10.2) 安装oracle basic&devel库(v10.2)
  • Installed php-pear package 安装php-pear包

Now I'm trying to install oci8 using "pecl install oci8" but I get an error message about "phpize" command not being found. 现在我正在尝试使用“pecl install oci8”安装oci8,但是我收到一条关于“phpize”命令未找到的错误消息。

My googling tells me that that is caused by "php-devel" not being installed, so i tried various different yum searches, eg "yum search php-devel", "yum search php5-devel", "yum search php-dev", etc... none of which could find anything. 我的谷歌搜索告诉我,这是由于“php-devel”没有被安装,所以我尝试了各种不同的yum搜索,例如“yum search php-devel”,“yum search php5-devel”,“yum search php-dev”等等......其中任何一个都找不到任何东西。

I eventually found a repository hosted by "utterramblings" which had php-devel. 我最终找到了一个由“utterramblings”托管的存储库,它有php-devel。 So, now when I do a yum search using that repository, it can find "php-devel": 所以,现在当我使用该存储库进行yum搜索时,它可以找到“php-devel”:

php-devel.i386 : Files needed for building PHP extensions php-devel.i386:构建PHP扩展所需的文件

But when I try to install it I get this: 但是当我尝试安装它时,我得到了这个:

Error: Package: php-devel-5.2.17-jason.2.i386 (utterramblings) 错误:包:php-devel-5.2.17-jason.2.i386(utterramblings)

       Requires: php = 5.2.17-jason.2
       Installed: php-5.3.3-14.el6_3.i686 (@rhel-i386-server-6)
           php = 5.3.3-14.el6_3
       Available: php-5.2.13-jason.1.i386 (utterramblings)
           php = 5.2.13-jason.1
       Available: php-5.2.14-jason.1.i386 (utterramblings)
           php = 5.2.14-jason.1
       Available: php-5.2.16-jason.1.i386 (utterramblings)
           php = 5.2.16-jason.1
       Available: php-5.2.17-jason.2.i386 (utterramblings)
           php = 5.2.17-jason.2
       Available: php-5.3.2-6.el6.i686 (rhel-i386-server-6)
           php = 5.3.2-6.el6
       Available: php-5.3.2-6.el6_0.1.i686 (rhel-i386-server-6)
           php = 5.3.2-6.el6_0.1
       Available: php-5.3.3-3.el6.i686 (rhel-i386-server-6)
           php = 5.3.3-3.el6
       Available: php-5.3.3-3.el6_1.3.i686 (rhel-i386-server-6)
           php = 5.3.3-3.el6_1.3
       Available: php-5.3.3-3.el6_2.5.i686 (rhel-i386-server-6)
           php = 5.3.3-3.el6_2.5
       Available: php-5.3.3-3.el6_2.6.i686 (rhel-i386-server-6)
           php = 5.3.3-3.el6_2.6
       Available: php-5.3.3-3.el6_2.8.i686 (rhel-i386-server-6)
           php = 5.3.3-3.el6_2.8

And to be honest, i'm not sure how to resolve that, presumably it has something to do with the version of php we have installed, but i'm not sure what I need to do to fix it. 说实话,我不知道如何解决这个问题,大概它与我们安装的php版本有关,但我不确定我需要做些什么来修复它。

These are our details: 这些是我们的细节:

Red Hat Enterprise Linux Server release 6.1 (Santiago) [32bit] 红帽企业Linux服务器版本6.1(圣地亚哥)[32位]

PHP 5.3.3 PHP 5.3.3

Could anyone please advise me as to either: 任何人都可以告诉我:

a) what I need to do to resolve that issue and get php-devel installed from that repo a)我需要做什么来解决这个问题并从该回购中安装php-devel

OR 要么

b) point me in the direction of another repo which will allow me to easily install php-devel for our server b)指向另一个repo的方向,这将允许我轻松地为我们的服务器安装php-devel

Thank you. 谢谢。

Managed to get it installed eventually. 管理最终安装它。

To quickly detail what I did for any future viewers, I ran: 为了快速详细说明我为未来的观众做了什么,我跑了:

yum list installed

To find out what exact package of php we had installed (5.5.3-14.el6_3 I think or something like that). 要找出我们安装的php的确切包(5.5.3-14.el6_3我认为或类似的东西)。

Then searched for the relevant php-devel package to match that php package version on rpm.pbone.net. 然后搜索相关的php-devel包以匹配rpm.pbone.net上的php包版本。

Tried to install that and failed with a "failed depencies" error "automake needed to install php-devel". 试图安装并失败“失败的依赖”错误“automake需要安装php-devel”。

Ran: 冉:

yum install automake

Then tried to installed the package again: 然后尝试再次安装包:

rpm -Uvh URLOFPACKAGE

It installed correctly, then ran: 它安装正确,然后运行:

pecl install oci8

And followed the instructions. 并按照说明进行操作。

Restarted httpd service and done. 重启了httpd服务并完成了。

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

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