Re: Unable to createlang - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Unable to createlang
Date
Msg-id D960CB61B694CF459DCFB4B0128514C207B2C9DC@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Unable to createlang  (Tom Harkaway <tomh@hvpa.com>)
List pgsql-general
Tom Harkaway wrote:
> The command I am using is:
>
>     createlang -U postgres plperl hf-hvpa
>
> The message I get back is:
>
>     createlang: language installation failed: ERROR:  could not load
library
> "/opt/postgres/lib/postgresql/plperl.so": libperl.so: cannot open
shared object file: No such file or
> directory

Try "ldd /opt/postgres/lib/postgresql/plperl.so" and you'll see what it
means.

PL/Perl needs Perl, and in your case it cannot find the Perl shared
library
in the library search path.

You have several options:
- Rebuild PostgreSQL without --disable-rpath.
- Add the directory that contains libperl.so to /etc/ld.so.conf and
  run "ldconfig" as root user.  Then start the PostgreSQL server.
- Set the environment variable LD_LIBRARY_PATH to contain the
  directory that contains libperl.so and export it in the environment
  of the PostgreSQL server.  Then start the server.

The third method is the worst.

Another thing:
Never do anything as root user unless you have to. Really.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: what happens when concurrent index create
Next
From: Jon Nelson
Date:
Subject: Re: views, queries, and locks