参考了这篇libpqxx 库安装及使用 - 简书安装libpqxx,遇到报错信息:
configure: error:
Linking a call to libpq failed in C++, even though it succeeded in C. If your
C and C++ compilers are very different beasts, this may mean that we do not have
the right options for linking with it after all.
网上给的解决方案是:
postgresql - Error in ./configure step in installation of libpqxx - Stack Overflow
看到可能是版本遗留问题,升级版本到5.0.1 还是这个错误,升级到7.2.0解决。
https://github.com/jtv/libpqxx
在git tags中找到合适的新版本即可。