Friday 6 November 2020

Create Extension Fails : ERROR: could not access file "$libdir/dblink"

 

After my recent DB upgrade activity, I was unable to create extension and was failing with the below errors.

postgres#  create extension dblink ;

ERROR:  could not access file "$libdir/dblink": No such file or directory

 

referring to Solution here 

[root@oracleasm1 dblink]# make clean && make PG_CONFIG=/usr/bin/pg_config && sudo make install PG_CONFIG=/usr/bin/pg_config

rm -f dblink.so   libdblink.a  libdblink.pc
rm -f dblink.o
rm -rf sql/paths.sql expected/paths.out
rm -rf results/ regression.diffs regression.out tmp_check/ tmp_check_iso/ log/ output_iso/
make -C ../../src/interfaces/libpq all
make[1]: Entering directory `/home/oracle/Desktop/f2/postgresql-10.0/src/interfaces/libpq'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/oracle/Desktop/f2/postgresql-10.0/src/interfaces/libpq'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -fPIC -I../../src/interfaces/libpq -I. -I. -I../../src/include  -D_GNU_SOURCE   -c -o dblink.o dblink.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -fPIC -shared -o dblink.so dblink.o  -L../../src/port -L../../src/common -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags  -L../../src/interfaces/libpq -lpq
make -C ../../src/interfaces/libpq all
make[1]: Entering directory `/home/oracle/Desktop/f2/postgresql-10.0/src/interfaces/libpq'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/oracle/Desktop/f2/postgresql-10.0/src/interfaces/libpq'
/bin/mkdir -p '/usr/local/pgsql/lib'
/bin/mkdir -p '/usr/local/pgsql/share/extension'
/bin/mkdir -p '/usr/local/pgsql/share/extension'
/usr/bin/install -c -m 755  dblink.so '/usr/local/pgsql/lib/dblink.so'
/usr/bin/install -c -m 644 ./dblink.control '/usr/local/pgsql/share/extension/'
/usr/bin/install -c -m 644 ./dblink--1.2.sql ./dblink--1.1--1.2.sql ./dblink--1.0--1.1.sql ./dblink--unpackaged--1.0.sql  '/usr/local/pgsql/share/extension/'

[root@oracleasm1 dblink]#


postgres# create extension dblink ;

CREATE EXTENSION


Found this post interesting? Subscribe us  :)😊😉


Read more 

Configure Streaming Replication in PostgreSQL

All about Physical Replication and Log shipping in Postgres 

Streaming-Replication Sync and Async, benefits of streaming replication over Log-shipping

No comments:

Post a Comment