Adacore GNATCOLL Postgres库未安装在CentOS 8上

问题描述

几天前,我发布了question内容是有关在CentOS 8上安装GNATCOLL库的问题。

我现在试图安装gnatcoll postgres库,我希望它是相同的过程。但是,当我尝试这样做时,会出现以下错误

[lloyd@localhost gnatcoll-db-20.0]$ cd postgres
[lloyd@localhost postgres]$ ls
gnatcoll_postgres.gpr              gnatcoll-sql-ranges.ads
gnatcoll-sql-postgres.adb          lib
gnatcoll-sql-postgres.ads          Makefile
gnatcoll-sql-postgres-builder.adb  makefile.setup
gnatcoll-sql-postgres-builder.ads  obj
gnatcoll-sql-postgres-gnade.adb    postgres_support.c
gnatcoll-sql-postgres-gnade.ads    README.md
gnatcoll-sql-ranges.adb
[lloyd@localhost postgres]$ make setup
[lloyd@localhost postgres]$ make
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_HASPQPREPARE=yes -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static \
    gnatcoll_postgres.gpr
Compile
   [C]            postgres_support.c
   [Ada]          gnatcoll-sql-ranges.adb
   [Ada]          gnatcoll-sql-postgres.adb
   [Ada]          gnatcoll-sql-postgres-gnade.adb
   [Ada]          gnatcoll-sql-postgres-builder.adb
gnatcoll-sql-postgres-gnade.ads:43:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-postgres-builder.adb:37:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-postgres-builder.adb:38:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-postgres-builder.adb:39:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-postgres.adb:30:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-postgres.ads:29:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
Build Libraries
   [gprlib]       gnatcoll_postgres.lexch
   [archive]      libgnatcoll_postgres.a
   [index]        libgnatcoll_postgres.a
gprbuild -p -m --target=x86_64-linux  -j0 -XGNATCOLL_HASPQPREPARE=yes -XGNATCOLL_VERSION=0.0 -XBUILD=PROD  -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -XGPR_BUILD=relocatable \
    gnatcoll_postgres.gpr
Setup
   [mkdir]        object directory for project GnatColl_Postgres
   [mkdir]        library directory for project GnatColl_Postgres
Compile
   [C]            postgres_support.c
   [Ada]          gnatcoll-sql-ranges.adb
   [Ada]          gnatcoll-sql-postgres.adb
gnatcoll-sql-postgres.adb:30:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
gnatcoll-sql-postgres.ads:29:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
   [Ada]          gnatcoll-sql-postgres-builder.adb
   [Ada]          gnatcoll-sql-postgres-gnade.adb
gnatcoll-sql-postgres-gnade.ads:43:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-postgres-builder.adb:37:14: warning: license of withed unit "GNATCOLL.Strings" may be inconsistent
gnatcoll-sql-postgres-builder.adb:38:14: warning: license of withed unit "GNATCOLL.Traces" may be inconsistent
gnatcoll-sql-postgres-builder.adb:39:14: warning: license of withed unit "GNATCOLL.Utils" may be inconsistent
Build Libraries
   [gprlib]       gnatcoll_postgres.lexch
   [bind SAL]     gnatcoll_postgres
   [Ada]          b__gnatcoll_postgres.adb
   [link library] libgnatcoll_postgres.so
/home/lloyd/opt/GNAT/2019/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.1/ld: cannot find -lpq
collect2: error: ld returned 1 exit status
gprlib: /home/lloyd/opt/GNAT/2019/bin/gcc execution error
gprbuild: Could not build library for project gnatcoll_postgres
make: *** [Makefile:123: build-relocatable] Error 4

对于为什么发生这种情况的任何帮助,将不胜感激。

谢谢, 劳埃德(Lloyd)

解决方法

如果您使用的是Centos 8,则简单

sudo yum -y install libpq-devel

将设置您。