Building PHP 5 from SRPM

I’m trying to install PHP 5 from the Interworx SRPM, but I’m having a problem…

[root@yoda ~]# rpmbuild --rebuild --with cos3x php-5.0.4-100.iworx.src.rpm
Installing php-5.0.4-100.iworx.src.rpm
error: Failed build dependencies:
imap-devel is needed by php-5.0.4-100.cos3x.iworx.i386
rh-postgresql-devel is needed by php-5.0.4-100.cos3x.iworx.i386

So of course I know I need to install the above dependancies. However, I get this:

[root@yoda ~]# yum install imap-devel rh-postgresql-devel
Setting up Install Process
Setting up repositories
interworx-cp-rhe4x 100% |=========================| 951 B 00:00
update 100% |=========================| 951 B 00:00
interworx-cp-noarch 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
No Match for argument: imap-devel
No Match for argument: rh-postgresql-devel
Nothing to do

How do I fix this?

Thanks :slight_smile:

Use the ‘–with rhe4x’ and not ‘–with cos3x’.

cos3x = CentOS 3.x and RHEL 3.x
rhe4x = CentOS 4.x and RHEL 4.x

Chris

I just tried that, and I get this:


checking lex output file root… ./configure: line 2422: lex: command not found
configure: error: cannot find output from lex; giving up
error: Bad exit status from /var/tmp/rpm-tmp.64342 (%build)

I’ve fixed it! :slight_smile:

I downloaded Flex, which wanted YACC, so I did “yum install bison” after finding out bison is an alternative for YACC. Then Flex installed, and PHP 5 is compiling! :cool:

Looks like you got it Fr3d, but for posterity anyone can do:


yum install flex

Chris