Re: error while executing a c program with embedded sql

From: <radha(dot)manohar(at)ndsu(dot)nodak(dot)edu>
To: <olly(at)lfix(dot)co(dot)uk>
Cc: <pgsql-novice(at)postgresql(dot)org>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: error while executing a c program with embedded sql
Date: 2003-11-10 15:00:27
Message-ID: 1371.134.129.92.208.1068476427.squirrel@webmail.ndsu.nodak.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-performance

Thanks a lot. IT WORKED! with your suggestions.

Regards,
Radha

> On Sun, 2003-11-09 at 15:06, radha(dot)manohar(at)ndsu(dot)nodak(dot)edu wrote:
>> I have a c program called test1.pgc with some sql statements embedded
>> in it. The program was preprocessed, compiled and linked. Now, I have
>> the executable test1.
>>
>> When I run the executable it says,
>>
>> ./test1: error while loading shared libraries: libecpg.so.3: cannot
>> open shared object file: No such file or directory
>>
>> What does it mean by this error message? What should I do to correct
>> this error and run the executable successfully?
>
> Shared libraries are loaded from directories specified to the system by
> ldconfig. Your shared library, libecpg.so.3, is in a PostgreSQL
> directory, such as /usr/local/pgsql/lib, which has not been added to the
> directories known to the loader.
>
> If you are able to add that directory with ldconfig, that is the best
> way to do it, but it requires root privilege.
>
> Otherwise you can set the environment variable LD_LIBRARY_PATH, thus:
>
> export LD_LIBRARY_PATH=/usr/local/pgsql/lib
>
> before you run the program, or you can use LD_PRELOAD:
>
> LD_PRELOAD=/usr/local/pgsql/lib/libecpg.so.3 ./test1
>
> --
> Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
> Isle of Wight, UK
> http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870
> 5839 932A 614D 4C34 3E1D 0C1C
> ========================================
> "O death, where is thy sting? O grave, where is
> thy victory?" 1 Corinthians 15:55

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2003-11-10 15:00:30 Re: UPDATE with help of RULES
Previous Message Volker Krey 2003-11-10 13:06:22 UPDATE with help of RULES

Browse pgsql-performance by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2003-11-10 16:27:20 Re: [PERFORM] error while executing a c program with embedded sql
Previous Message Oliver Elphick 2003-11-09 17:32:25 Re: error while executing a c program with embedded sql