我正在尝试使用 ubuntu 10.04 在本地处理 postgresql。配置后出现此错误
./configure --enable-cassert --enable-debug --prefix=$HOME/pgsql
当我 make && 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 才能使其正常工作?
最佳答案
您需要再次运行 ./configure
以便 make 文件“知道”flex。
关于postgresql - Ubuntu:如何安装 flex 来制作 postgres?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3827938/