X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id CA7739FB0D1 for ; Fri, 23 Jun 2006 17:15:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 04660-10 for ; Fri, 23 Jun 2006 17:15:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from fuse17.mailanyone.net (fuse17.mailanyone.net [69.31.1.213]) by postgresql.org (Postfix) with ESMTP id F0CAC9FA60B for ; Fri, 23 Jun 2006 17:15:26 -0300 (ADT) Received: from mailanyone.net by fuse17.mailanyone.net with asmtp (MailAnyone extSMTP kkempter) id 1Fts3l-0007ds-VP for pgsql-interfaces@postgresql.org; Fri, 23 Jun 2006 15:15:21 -0500 Received: from 63.214.184.6 (FuseMail web AccountID 164106) by webmail.fusemail.com with HTTP; Fri, 23 Jun 2006 15:15:15 -0500 (CDT) Message-ID: <1151093715.v2.fusewebmail-164106@ffuse12> Date: Fri, 23 Jun 2006 15:15:15 -0500 (CDT) Subject: pl/perl library question From: "LLC" To: pgsql-interfaces@postgresql.org Reply-To: kevin@kevinkempterllc.com User-Agent: FuseMail W MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/32 X-Sequence-Number: 6173 Hi List; I'm getting a library 'not fount' error when I run a pl/perl function. Here's what I've done: 1) I'm on a Red Hat RHEL4 box with many many perl versions/installs and the dev team is using them all. I do not want to step on anyone's dev efforts so I downloaded and installed my own perl install in /usr/local/pgsperl 2) next I set the following: export PATH=/usr/local/pgsperl/bin:$PATH export PERL5LIB=/usr/local/pgsperl/lib export MANPATH=/usr/local/pgsperl/man:$MANPATH export SYBASE=/usr/local/TDS # for freetds 3) with the above env variables set I installed DBI via: perl -MCPAN -e 'install Bundle::DBI' 4) next I installed DBD::Sybase via the source. Ran make install and it installed in /usr/local/pgsperl/lib/site_perl/5.8.7/x86_64-linux/auto/DBD/Sybase 5) I wrote a test perl script that connects to a Sql Server db, and executes a select count(*) for a table. Running this script works. 6) created a function based on untrusted perl that executes a select of a remote sql Server db table. 7) created an sql stmt to select * from this function I've also created the same function and sql stmt on my laptop running SuSE 10 and postgres and the function works fine. The SuSE laptop has only the default perl install. I can create the function (sybase_get) on the RHEL with no problems, however when I run the select (see below) which works on the SuSE laptop I get the following error: ########## SQL STMT ######### select * from sybase_get() as (loc_parent_id varchar(100), cricket_location_id_key varchar(100)); ######### errors returned ################# $ psql pltest < tst7.sql ERROR: error from Perl function: install_driver(Sybase) failed: Can't load '/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBD/Sybase/Sybase.so' for module DBD::Sybase: libct.so.3: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/DynaLoader.pm line 230. at line 3 Compilation failed in require at line 3. Perhaps a required shared library or dll isn't installed where expected at line 5 It seems that pl/perl is looking in /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto Is there a way to tell postgres to look in /usr/local/pgsperl/lib/site_perl/5.8.7/x86_64-linux/auto ? Thanks in advance for your help.