Permission Denied on shared object (.so) file postgresql
Permissions on the path and file should be postgres:postgres.

ls -l /home/pedro/.../.../example.so
chown -R postgres: /home/pedro/.../.../


You will probably need sudo for changing the file ownership.