List:General Discussion« Previous MessageNext Message »
From:Aldrian Gintingsuka Date:April 16 1999 3:52am
Subject:Re: fatal error on running MySQL CGI in C
View as plain text  
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> 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> I compiled my source code with the following command (all on one line)
tavaris> gcc -I/usr/local/mysql/include/mysql -L/usr/local/mysql/lib/mysql -o test
tavaris> test2.c -lmysqlclient -lsocket -lm
tavaris> this compiles without errors however when I try to run "test"
tavaris> I get the following error:
tavaris> # ./test
tavaris> ./test: fatal: open failed: No such file or
tavaris> directory
tavaris> Killed
tavaris> I know my error has to do with the mysqlclient library but can't solve it.
tavaris> The file exists in the /etc/lib                directory

fatal error on running MySQL CGI in CTavaris Thomas15 Apr
  • Re: fatal error on running MySQL CGI in CSasha Pachev15 Apr
  • Re: fatal error on running MySQL CGI in CAldrian Gintingsuka16 Apr