Обсуждение: Unable to createlang
I am having a problem trying to create a language in a new install of Postgres - I have installed postgres 9.1 on a minimal (i.e. no GUI) CentOS 6.2 system. - Psql is running and I am able to connect to the database from pgAdmin running on a Windows box. - Postgres was installed in /opt/postgres - The data was placed in /var/postgres/data. I am migrating a database from an 8.4 system to the new system. I am trying to add the plperl and plperlu languages, whichare used in the 8.4 system. 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 I am doing this as the root user, but I have also tried it using my login and as the postgres user. The plperl.so file isin the indicated directory, but I am not sure what the reference to libperl.so means. Is that a separate file I need todownload? I am fairy new to both Linux and Postgres, however I have successfully installed Postgres on a Windows systems. Sincerely appreciate any help. Tom Harkaway
On Tue, Apr 3, 2012 at 8:26 PM, Tom Harkaway <tomh@hvpa.com> wrote:
I am having a problem trying to create a language in a new install of Postgres
- I have installed postgres 9.1 on a minimal (i.e. no GUI) CentOS 6.2 system.
- Psql is running and I am able to connect to the database from pgAdmin running on a Windows box.
- Postgres was installed in /opt/postgres
- The data was placed in /var/postgres/data.
I am migrating a database from an 8.4 system to the new system. I am trying to add the plperl and plperlu languages, which are used in the 8.4 system.
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
I am doing this as the root user, but I have also tried it using my login and as the postgres user. The plperl.so file is in the indicated directory, but I am not sure what the reference to libperl.so means. Is that a separate file I need to download?
I am fairy new to both Linux and Postgres, however I have successfully installed Postgres on a Windows systems.
Sincerely appreciate any help.
set the LD_LIBRARY_PATH environment variable to the PostgreSQL lib location location and retry.
---
Regards,
Raghavendra
EnterpriseDB Corporation
Tom Harkaway
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/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