Hello, I want to use the perl language in a postgres function.
I am attempting to: CREATE EXTENSION plperlu ...via pgAdmin 4 connected to postgres 10 and I get this error: ERROR: could not load library "/var/lib/pgsql10/lib/postgresql/plperl.so": libperl.so: cannot open shared object file: No such file or directory SQL state: XX000 I look for the library: find -name libperl.so ...and I see it in these locations: ./usr/lib/perl5/5.18.2/i586-linux-thread-multi/CORE/libperl.so ./usr/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE/libperl.so So I conclude that it is already on my server distribution, but isn't in the location postgres is looking so I search and find this link: https://www.postgresql.org/message-id/D960CB61B694CF459DCFB4B0128514C207B2C9DC%40exadv11.host.magwien.gv.at ...and I am opting do this (from the link above, but I have different paths): "- Add the directory that contains libperl.so to /etc/ld.so.conf and run "ldconfig" as root user. Then start the PostgreSQL server." So I find the config file: find -name ld.so.conf And get this path: ./etc/ld.so.conf ...and edit the file: vi ./etc/ld.so.conf ... and add this path: ./usr/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE/ ... load the new config: ldconfig ... restart pg: systemctl restart postgresql-10.service ... run this query: CREATE EXTENSION plperlu; ...and get the same error: ERROR: could not load library "/var/lib/pgsql10/lib/postgresql/plperl.so": libperl.so: cannot open shared object file: No such file or directory SQL state: XX000 ...when I replace the previous path and add this path: /usr/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE ...to ld.so.conf, I get: ERROR: could not load library "/var/lib/pgsql10/lib/postgresql/plperl.so": /var/lib/pgsql10/lib/postgresql/plperl.so: undefined symbol: Perl_xs_handshake SQL state: XX000 ... a little different error, but I don't know if I am closer or further away. How do I get PostgreSQL pointed to the correct library so I can use perl? I have: * PostgreSQL 10.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18), 64-bit * pgAdmin 4 2.0 * SUSE Linux Enterprise 12 64-bit virtual server PS - If you prefer Stackoverflow, I asked the exact question here, but haven't gotten any traction yet: https://stackoverflow.com/questions/47578148/error-could-not-load-library-libperl-so-postgresql-trying-to-create-extension Thanks! Ben