PHP 5 Compilation on Linux

Hi !

I'm tring to compile php-5.0.3 on Linux RH AS 2.1 with Informix functions support. And I've recieved following messages:

# ./configure --with-informix --with-apache=/usr/src/Apache/apache_1.3.23
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... exit 0;
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for mawk... no
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.28 (ok)
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: lex: command not found
configure: error: cannot find output from lex; giving up

I tried to run cofigure without options, but result was the same.
Could you tell me, if there is problems with compiller

As the log tells you, it cannot find the "lex" command. Try

which lex

to see whether one exists. If not, try to install it and see if configure goes OK. I have compiled PHP5 on a number of Linux installations involving different distros, and all of them have been very smooth.

I installed flex and pass this error message.

Thank you!