lex: command not found

编译php报错:

checking lex output file root…  ./configure: line 2540: lex: command not found

原因是缺少flex包。

[root@rhel php-5.1.6]# rpm -ihv /mnt/cdrom/Server/flex-2.5.4a-41.fc6.x86_64.rpm

解决!