From: Aldrian Gintingsuka Date: April 16 1999 3:52am Subject: Re: fatal error on running MySQL CGI in C List-Archive: http://lists.mysql.com/mysql/1929 Message-Id: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII You need to set LD_LIBRARY_PATH to include /usr/local/mysql/lib/mysql. Or you could also use -R/usr/local/mysql/lib/mysql during compilation to tell the resulting application to search the shared library in that directory. Hope this helps. ======================================================================== Aldrian Gintingsuka -- Systems Consultant -- Mitra Integrasi Informatika Phone: +62-21-251-1360 ext. 1414 -- Fax: +62-21-251-2748 Email: aldrian@stripped, aldrian@stripped ------------------------------------------------------------------------ Si tu es contre Dieu, tu es contre l'homme (Enigma: Sadeness part I) On Thu, 15 Apr 1999, Tavaris Thomas wrote: tavaris> To whom it may concern: tavaris> tavaris> I am running MySQL ver 3.22.20a tavaris> My compiler is egcs 1.1.2 on a SUN Ultra 1 with Solaris 2.6 tavaris> I am trying to write CGIs to access MySQL via a web browser. (written in C) tavaris> tavaris> I compiled my source code with the following command (all on one line) tavaris> tavaris> gcc -I/usr/local/mysql/include/mysql -L/usr/local/mysql/lib/mysql -o test tavaris> test2.c -lmysqlclient -lsocket -lm tavaris> tavaris> this compiles without errors however when I try to run "test" tavaris> I get the following error: tavaris> tavaris> # ./test tavaris> ld.so.1: ./test: fatal: libmysqlclient.so.6: open failed: No such file or tavaris> directory tavaris> Killed tavaris> tavaris> I know my error has to do with the mysqlclient library but can't solve it. tavaris> The ld.so.1 file exists in the /etc/lib directory tavaris>