1
votes

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/

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

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
2
I believe the php-devel version needs to match your php version. Try installing php-devel from the same repo where your php came from. Or, you could uninstall php and reinstall it along with php-devel from the same repo. If you're not very experienced with *nix and this is for a remote production server you should be careful with this approach, though :)rdlowrey
I tried searching for a php-devel version for 5.3 and couldn't find a repo. I could only find php53-devel which looks like something different than what I have. When I run php -v I get 5.3.6. Would you know of a php-devel repo for php 5.3? Thanks.stampede76
Posted some instructions in an answer below ... hope that helpsrdlowrey

2 Answers

3
votes

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

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.

SUMMARY

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.

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.

SOLUTION

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

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

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 :)

1
votes

I'm installing it now with "yum install php-pecl-oauth" in centos 5.3.