postgresql - Ubuntu:如何安装 flex 来制作 postgres?

标签 postgresql ubuntu flex-lexer

我正在尝试使用 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/

相关文章:

sql - 如何比较 postgres 更新策略中一行的旧值和新值

linux - Qt5 Linux 找不到Qt库

c - Bison 和 Flex 计算器未正确分配值

python - 如何在用户注册时生成一个魔数(Magic Number)并将其填充到数据库中?

sql - 插入多行时重复项会发生什么情况?

sql - 如果另一列为真,Postgres 是否可以覆盖其中一列?

ubuntu - SSL 证书不工作 - "no start line"错误 - Apache2 Ubuntu 16.04.1

performance - MongoDB Ubuntu 安装需要几个小时

从 INTEGER 到 int 的代码生成

c - Flex yy_scan_string 内存泄漏