#su - postgres
# vi .bash_profile
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export PGHOME=/usr/local/pgsql/
export PGDATA=/data/pgsql_5432/data/
export LD_LIBRARY_PATH=/usr/local/pgsql/lib
export BACKUP_PATH=/data/db_backup
export ARCLOG_PATH=/data/pgsql_5432/archive/
export SRVLOG_PATH=/data/pgsql_5432/logs
export PATH=$PATH:$HOME/.local/bin:$HOME/bin:$PGHOME/bin:$PATH
$ cd /usr/local/pgsql/contrib/dblink/
$make && make install
In file included from ../../src/include/postgres.h:47:0,
from path.c:17:
../../src/include/utils/elog.h:71:28: fatal error: utils/errcodes.h: No such file or directory
#include "utils/errcodes.h"
^
compilation terminated.
make[2]: *** [path_srv.o] Error 1
make[2]: Leaving directory `/usr/local/postgresql-12.3/src/port'
make[1]: *** [submake-libpgport] Error 2
make[1]: Leaving directory `/usr/local/postgresql-12.3/src/interfaces/libpq'
make: *** [submake-libpq] Error 2