#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Texas
    Posts
    5
    Rep Power
    0

    php installation issues - red hat linux


    Hello. I am trying to install php on my linux box and when I go to configure it, I get the error below:

    [sifactor@test105 php-4.3.1]$ sudo ./configure --with-mysql --with-apxs
    loading cache ./config.cache
    checking for Cygwin environment... no
    checking for mingw32 environment... no
    checking for working sed... sed
    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 ranlib... ranlib
    checking whether ln -s works... yes
    checking for gawk... gawk
    checking for bison... no
    checking for byacc... no
    configure: warning: You will need bison if you want to regenerate the PHP parsers.
    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
    [sifactor@test105 php-4.3.1]$

    sudo is a program that gives me root access when needed (it's really a friend's server that he's letting me experiment on until i get mine). I've looked through all the documentation i could find on php and no where did i find anything to address this problem...so i'm hoping that maybe someone here can help me out.

    Thanks in advance!
  2. #2
  3. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    21
    You need to install lex (or flex) - this comes in the form of an RPM for RedHat, and it should be on the install CD. Or you can get it from here - choose the correct RPM for your version of Redhat.


    Hope this helps.
    Alex
    (http://www.alex-greg.com)
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Texas
    Posts
    5
    Rep Power
    0
    ya, that was it. Thanks man!
  6. #4
  7. An Ominous Coward
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2002
    Posts
    4,424
    Rep Power
    0
    You don't need to root access to configure or make PHP. You only need to switch to root to do the 'make install' step.

IMN logo majestic logo threadwatch logo seochat tools logo