编译 libpqxx 7.0.5 时出现问题,找不到 postgreSQL 库

Problem compiling libpqxx 7.0.5, can't find postgreSQL libraries

我正在尝试编译 libpqxx 7.0.5,但在查找我已安装的 postgresql 库时遇到问题。

我都安装了 postgresql and postgresql-libs。为什么给我这个错误?

configure 脚本在此处停止:

configure: using PostgreSQL headers at
configure: using PostgreSQL libraries at
checking /libpq-fe.h usability... no
checking /libpq-fe.h presence... no
checking for /libpq-fe.h... no
configure: error:
Can't find libpq-fe.h in .  Are you sure the libpq
headers are installed correctly?  They should be in the directory returned by
"pg_config --includedir" or "pkg-config libpq --cflags".

If you do have libpq (the C-language client library for PostgreSQL) installed,
make sure you have the related development materials--mainly its header files--
as well as the library binary.  Some system distributions keep the two in
seperate packages with names like "alibrary" and "alibrary-dev", respectively.
In that case, make sure you have the latter installed as well.

该文件确实在我的 /usr/include 目录中。

我想出了如何让它工作。我需要将目录添加到库所在的位置。

./configure --with-postgres-include='/usr/include'

这样做一切正常!

我也将 libpqxx 降级到版本 7.0.3