0

I've been working on pgpool2 setup with 2 DB node and I need to attach on the node, which os currently down. when I run

postgres@pg-pool:~$ pcp_attach_node -p 9898 -n 1 -U postgres

I get following error.

pcp_attach_node -p 9898 -n 1 -U postgres pcp_attach_node: error while loading shared libraries: libpcp.so.1: cannot open shared object file: No such file or directory

I am using:

- pgpool-II-4.0.1
- ubuntu 18.04 LTS
- postgresql 10

I have installed:

postgresql-contrib 
gcc 
make 
libpq-dev

pgpool installation:

./configure
make
make install

Contents of /usr/local/lib

-rwxr-xr-x  1 root root     959 Mar 18 07:55 libpcp.la*
lrwxrwxrwx  1 root root      15 Mar 18 07:55 libpcp.so -> libpcp.so.1.0.0*
lrwxrwxrwx  1 root root      15 Mar 18 07:55 libpcp.so.1 -> libpcp.so.1.0.0*
-rwxr-xr-x  1 root root  244296 Mar 18 07:55 libpcp.so.1.0.0*

Your help would be great

  • 1
    Looks like a dynamic loader configuration issue. What is the value of $LD_LIBRARY_PATH ? Try to add /usr/local/lib to LD_LIBRARY_PATH in the environment that starts pgpool. See details in unix.stackexchange.com/questions/354295/…. – pifor Apr 8 at 6:41
  • @pifor you are correct. your suggestion is working. – Umanda Apr 9 at 7:42
0

As @pifor mentioned the issues was $LD_LIBRARY_PATH . Following code has fixed my issue.

Thank you @pifor

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.