pcp_attach_node not working in pgpool 2 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 -&gt; libpcp.so.1.0.0*
lrwxrwxrwx  1 root root      15 Mar 18 07:55 libpcp.so.1 -&gt; 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
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