Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Installing DBD via CPAN

by agoth (Chaplain)
on Jul 17, 2001 at 13:47 UTC ( [id://97277]=note: print w/replies, xml ) Need Help??


in reply to Installing DBD via CPAN

I found this in the install.html ::>

cflags

This is a list of flags that you want to give to the C compiler. The most important flag is the location of the MySQL header files. For example, on Red Hat Linux the header files are in /usr/include/mysql and you might try

-I/usr/include/mysql

NB This may help with a manual install, there is also mention of different required packages for different linux distro's which may assist?

Replies are listed 'Best First'.
Re: Re: Installing DBD via CPAN
by costas (Scribe) on Jul 17, 2001 at 14:21 UTC
    Ive tried
    perl Makefile>PL --cflags=-I/usr/local/mysql
    I get this error:
    Failed to determine directory of libmysqlclient.a|libmysqlclient.so.

    My command of unix is still quite medium. Can you see what is wrong in my command.
    Costas
      You're making progress... now you just need to tell it where to find your mysql libraries by adding to your perl Makefile.pm commandL
      --cflags=-I/usr/local/mysql -libs=-L/path/to/mysql/libs

      You can find most of this information in the INSTALL.html file that's in the tio level of your DBD-mysql build directory -- if you continue to have difficulty, look for the answer there before posting here -- might save you a lot of time.

      Gack. I totally missed this. (Sorry... it's late... or early rather...)
      --cflags=-I/usr/local/mysql -libs=-L/path/to/mysql/libs
      Should be
      --cflags=-I/usr/local/mysql/include -libs=-L/usr/local/mysql/lib/mysql
      That's why your compiler is unable to find mysql.h and errmsg.h. It doesn't have the right include directory set. (Assuming your mysql install directory is /usr/local/mysql/)
      That seems fine as long as mysql.h is in that directory? At a guess it's found your header files but cant get to the client libraries.

      I'm only getting this from the Doc's you know :) !, though I've had problems with DBD::Oracle in the past....

      In addition to --cflags use the --libs directive as well to specify where the .so or .a files are and see if that gets you over both hurdles.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://97277]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2024-03-28 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found