CentOS 5上的PHP 5.3的PECL OAuth [英] PECL OAuth for PHP 5.3 on CentOS 5

查看:96
本文介绍了CentOS 5上的PHP 5.3的PECL OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在centos 5上运行pecl install oauth时遇到问题。我按照以下说明安装了PHP 5.3.6:

I am having trouble running pecl install oauth on centos 5. I installed PHP 5.3.6 using these instructions:

http://www.webtatic.com/packages/php53/

何时我尝试运行pecl install oauth我得到:

When I try to run pecl install oauth I get:

downloading oauth-1.2.2.tgz ...
Starting to download oauth-1.2.2.tgz (45,348 bytes)
.............done: 45,348 bytes
6 source files, building
running: phpize
Can't find PHP headers in /usr/include/php
The php-devel package is required for use of this command.
ERROR: `phpize' failed

当我尝试yum时--enablerepo = webtatic安装php -开发我得到

When I try yum --enablerepo=webtatic install php-devel I get

--> Running transaction check
---> Package php-devel.i386 0:5.2.17-1.1.w5 set to be updated
--> Processing Dependency: php = 5.2.17-1.1.w5 for package: php-devel
--> Finished Dependency Resolution
php-devel-5.2.17-1.1.w5.i386 from webtatic has depsolving problems
  --> Missing Dependency: php = 5.2.17-1.1.w5 is needed by package php-devel-5.2.17-1.1.w5.i386 (webtatic)
Error: Missing Dependency: php = 5.2.17-1.1.w5 is needed by package php-devel-5.2.17-1.1.w5.i386 (webtatic)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                    package-cleanup --dupes
                    rpm -Va --nofiles --nodige


推荐答案

发布答案,因为在评论中回复太久了……

Posting an answer as this would've been too long to respond in the comments ...

I不知道可以从中获取与PHP安装相匹配的php-devel版本的特定存储库,因此,我将总结您的问题,并提供如果您要与匹配的php-重新安装php时可以采取的步骤-开发版本。

I don't know of a specific repo where you can get the php-devel version to match your php installation, so I'm going to summarize your issue and provide the steps you could take if you wanted to reinstall php with the matching php-devel version.

摘要

您的问题本质上是CentOS 5的结果利用非常过时的PHP版本。 CentOS的维护者使用较旧的PHP版本是有意义的,因为他们的目标是为企业使用提供尽可能稳定的环境。

Your problem is essentially the result of CentOS 5 utilizing a very outdated version of PHP. It makes sense for the maintainers of CentOS to use an older PHP version because their goal is to provide the most stable environment possible for enterprise use.

由于版本过时PHP,看来您有时已经通过外部存储库更新了PHP版本(没有安装等效的php-devel软件包)。可能很难找到一个可在其中找到与php版本匹配的确切版本的php-devel的存储库,因此最好的方法是从另一个存储库升级php,同时从同一存储库安装php-devel。

Owing to the outdated version of PHP it seems you have at some point updated your PHP version via an outside repository (without also installing the equivalent php-devel package). It might be difficult to find a repo where you can find the exact version of php-devel to match your php version, so the best course is to upgrade your php from another repo and simultaneously install php-devel from that same repo.

解决方案

我在其中一台VPS服务器上使用CentOS 5,使用 Remi Collet的repo 成功升级了PHP和MySQL。以下说明来自该站点上的存储库配置(第2.3节)页,并将进行设置用于您的yum安装的remi.repo:

I deal with CentOS 5 on one of my VPS servers and I've had success using Remi Collet's repo to upgrade both PHP and MySQL. The following instructions are from the Repository Configuration (section 2.3) page on that site and will setup the remi.repo for your yum installation:

su -
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo

完成此操作后,您可以使用以下方法更新php安装并安装匹配的php-devel软件包。请注意,默认情况下未启用remi repo,因此您指定--enablerepo标志:

Once you've done that, you can then update your php installation and install the matching php-devel package using the following. Note the remi repo isn't enabled by default, so you specify the --enablerepo flag:

yum --enablerepo=remi-test update php
yum --enablerepo=remi-test install php-devel

应该可以让您随后毫无问题地安装pecl oauth扩展。而且,如果由于某种原因而没有,至少您将拥有一个闪亮的PHP更新版本:)

This should allow you to then install the pecl oauth extension without problems. And if for some reason it doesn't, well at least you'll have a shiny new updated version of PHP :)

这篇关于CentOS 5上的PHP 5.3的PECL OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆