我正在尝试在Ubuntu 10.04上本地使用PostgreSQL,但在配置后出现以下错误:
./configure --enable-cassert --enable-debug --prefix=$HOME/pgsql
当我执行 && make install 命令时,出现了以下错误:
make -C parser all
make[3]: Entering directory `/home/james/school/db/pg-stuff/hw1/postgresql-8.4.2/src/backend/parser'
ERROR: `flex' is missing on your system. It is needed to create the
file `scan.c'. You can either get flex from a GNU mirror site
or download an official distribution of PostgreSQL, which contains
pre-packaged flex output.
make[3]: *** [scan.c] Error 1
make[3]: Leaving directory `/home/james/school/db/pg-stuff/hw1/postgresql-8.4.2/src/backend/parser'
make[2]: *** [parser-recursive] Error 2
make[2]: Leaving directory `/home/james/school/db/pg-stuff/hw1/postgresql-8.4.2/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/james/school/db/pg-stuff/hw1/postgresql-8.4.2/src'
make: *** [all] Error 2
我尝试着运行apt-get install flex
,但是却得到了相同的错误。请问如何安装flex才能让它正常工作呢?