Se produjo el error anterior cuando estaba tratando de crear el idioma plperlu. Indica que falta una biblioteca libperl.so. Consulte los pasos realizados para superar este problema y crear con éxito el lenguaje plperlu en PostgreSQL.
Método 1 (Encontrar libperl.so y crear un vínculo directo a esa ubicación)
postgres=# create LANGUAGE plperlu;
ERROR: could not load library "/opt/PostgreSQL/9.0/lib/postgresql/plperl.so": libperl.so: cannot open shared object file: No such file or directory
postgres=# q
Ahora, busque el archivo libperl.so en su caja y agregue esa ubicación a su RUTA LD_LIBRARY. No olvides cambiar de usuario a postgres.
[root@localhost /]# find -name libperl.so
./usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/libperl.so
./usr/lib/perl5/CORE/libperl.so
./usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE
[root@localhost /]# su - postgres
Establecer el LD_LIBRARY_PATH
-bash-4.1$ export LD_LIBRARY_PATH=/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE:$LD_LIBRARY_PATH
Reinicie el clúster para efectuar los cambios.
-bash-4.1$ pg_ctl restart
waiting for server to shut down....... done
server stopped
server starting
Ahora está listo para crear el idioma.
-bash-4.1$ psql
psql (9.0.1)
Type "help" for help.
postgres=# create LANGUAGE plperlu;
CREATE LANGUAGE
Método 2 (Instalando el último ActivePerl)
Paso 1:
Después de instalar ActivePerl, configure LD_LIBRARY_PATH.
postgres@localhost:/opt/ActivePerl-5.12/lib/CORE> export LD_LIBRARY_PATH=/opt/ActivePerl-5.12/lib/CORE:/opt/PostgreSQL/9.0/lib/postgresql
Paso 2:
postgres@localhost:/opt/PostgreSQL/9.0/lib/postgresql> ldd plperl.so
linux-vdso.so.1 => (0x00007fff8cf79000)
libperl.so => /opt/ActivePerl-5.12/lib/CORE/libperl.so (0x00007fbd3d654000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fbd3d40a000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fbd3d206000)
libm.so.6 => /lib64/libm.so.6 (0x00007fbd3cfb0000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fbd3cd74000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007fbd3cb71000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbd3c954000)
libc.so.6 => /lib64/libc.so.6 (0x00007fbd3c5f5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbd3dad8000)
Paso 3:
postgres@localhost:/opt/PostgreSQL/9.0/lib/postgresql> pg_ctl restart
postgres@localhost:/opt/PostgreSQL/9.0/lib/postgresql> psql
psql (9.0.2)
Type "help" for help.
postgres=# create language plperlu;
CREATE LANGUAGE
Publique sus comentarios.