pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu
5+ messages / 3 participants
[nested] [flat]
* ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu
@ 2017-11-30 22:20 Ben Nachtrieb <bnachtrieb@crescat.net>
0 siblings, 1 reply; 5+ messages in thread
From: Ben Nachtrieb @ 2017-11-30 22:20 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; +Cc: Ben Nachtrieb <bnachtrieb@crescat.net>
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.magwie...
...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-tryi...
Thanks!
Ben
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu
@ 2017-11-30 22:35 Alan Hodgson <ahodgson@lists.simkin.ca>
parent: Ben Nachtrieb <bnachtrieb@crescat.net>
0 siblings, 1 reply; 5+ messages in thread
From: Alan Hodgson @ 2017-11-30 22:35 UTC (permalink / raw)
To: pgsql-general <pgsql-general@lists.postgresql.org>
On Thu, 2017-11-30 at 22:20 +0000, Ben Nachtrieb wrote:
>
>
> ...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
It looks to me like your plperl is built against a substantially
different version of Perl than what you have installed on the server.
I'd guess you installed a PostgreSQL binary built on a different OS
version, or have otherwise mismatched packages.
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu
@ 2017-11-30 22:59 Ben Nachtrieb <bnachtrieb@crescat.net>
parent: Alan Hodgson <ahodgson@lists.simkin.ca>
0 siblings, 1 reply; 5+ messages in thread
From: Ben Nachtrieb @ 2017-11-30 22:59 UTC (permalink / raw)
To: Alan Hodgson <ahodgson@lists.simkin.ca>; pgsql-general <pgsql-general@lists.postgresql.org>
Alan,
Thank you! Solution: build them from source on the server?
Ben
From: Alan Hodgson [mailto:ahodgson@lists.simkin.ca]
Sent: Thursday, November 30, 2017 3:36 PM
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu
On Thu, 2017-11-30 at 22:20 +0000, Ben Nachtrieb wrote:
...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
It looks to me like your plperl is built against a substantially different version of Perl than what you have installed on the server.
I'd guess you installed a PostgreSQL binary built on a different OS version, or have otherwise mismatched packages.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu
@ 2017-11-30 23:49 Alan Hodgson <ahodgson@lists.simkin.ca>
parent: Ben Nachtrieb <bnachtrieb@crescat.net>
0 siblings, 1 reply; 5+ messages in thread
From: Alan Hodgson @ 2017-11-30 23:49 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On Thu, 2017-11-30 at 22:59 +0000, Ben Nachtrieb wrote:
> Alan,
>
>
>
> Thank you! Solution: build them from source on the server?
Well, it would be more maintainable to find a source for packages built
for your particular OS. Or run a supported OS; that one looks pretty
old.
Or I guess you can build from source.
>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu
@ 2017-12-04 00:13 Peter J. Holzer <hjp-pgsql@hjp.at>
parent: Alan Hodgson <ahodgson@lists.simkin.ca>
0 siblings, 0 replies; 5+ messages in thread
From: Peter J. Holzer @ 2017-12-04 00:13 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 2017-11-30 15:49:28 -0800, Alan Hodgson wrote:
> On Thu, 2017-11-30 at 22:59 +0000, Ben Nachtrieb wrote:
> Thank you! Solution: build them from source on the server?
>
> Well, it would be more maintainable to find a source for packages built for
> your particular OS.
https://www.postgresql.org/download/linux/suse/?
> Or run a supported OS; that one looks pretty old.
SLES 12 is the current version of SLES.
hp
--
_ | Peter J. Holzer | we build much bigger, better disasters now
|_|_) | | because we have much more sophisticated
| | | hjp@hjp.at | management tools.
__/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/;
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2017-12-04 00:13 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 22:20 ERROR: could not load library libperl.so, PostgreSQL trying to CREATE EXTENSION plperlu Ben Nachtrieb <bnachtrieb@crescat.net>
2017-11-30 22:35 ` Alan Hodgson <ahodgson@lists.simkin.ca>
2017-11-30 22:59 ` Ben Nachtrieb <bnachtrieb@crescat.net>
2017-11-30 23:49 ` Alan Hodgson <ahodgson@lists.simkin.ca>
2017-12-04 00:13 ` Peter J. Holzer <hjp-pgsql@hjp.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox