I am trying to write a basic client for Postgres integration in C using libpq, I compiled the libraries following the Client-only installation on this page and so far so good, I compile my program with the following:
cc -o connect connect.c -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpq
and by running the program this is the output:
./connect: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory
I correctly compiled all the libraries and libpq.so.5 is on the system:
plocate libpq.so.5
return /usr/local/pgsql/lib/libpq.so.5
Could anyone help me with this? What am I missing?
Thanks in advance
New contributor
Lorenzo Cesana is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.