1、解压oracle_fdw包
unzip oracle_fdw-ORACLE_FDW_2_5_0.zip
cd oracle_fdw-ORACLE_FDW_2_5_0/
[root@pg14 oracle_fdw-ORACLE_FDW_2_5_0]# make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I"/sdk/include" -I"/oci/include" -I"/rdbms/public" -I"/" -I. -I./ -I/home/postgres/pg14/include/server -I/home/postgres/pg14/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o oracle_fdw.o oracle_fdw.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -O2 -fPIC -I"/sdk/include" -I"/oci/include" -I"/rdbms/public" -I"/" -I. -I./ -I/home/postgres/pg14/include/server -I/home/postgres/pg14/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -c -o oracle_utils.o oracle_utils.c
oracle_utils.c:22:10: 致命错误:oci.h:没有那个文件或目录
#include <oci.h>
^~~~~~~
编译中断。
make: *** [<内置>:oracle_utils.o] 错误 1
2、安装以下三个包
oracle-instantclient-basic-21.7.0.0.0-1.el8.x86_64.rpm
oracle-instantclient-devel-21.7.0.0.0-1.x86_64.rpm
oracle-instantclient-sqlplus-21.7.0.0.0-1.x86_64.rpm
3、再次编译
make && make install
参考连接: