how to install DBD::MySQL?

Lona, I would like to recomend VTC to you. What you are looking for is Unix Shell Fundamentals. Virtual Training Company

They have all sorts of video tutorials on how to use diferent types of software. It costs $25 US per month. You can start by watching the free videos in the first 2 chapters of all of the different tutorials they have to offer. It is well worth it.

Good Luck -Jason :D
 
XYZed said:
Everytime I try any of the above for DBD::mysql on a RH9 server I get:
linux-thread-multi/auto/DBI at Makefile.PL line 295
Using DBI 1.38 installed in /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI
Writing Makefile for DBD::mysql
[root@server DBD-mysql-2.9003]# make
Makefile:89: *** missing separator. Stop.

I normally do get it, but after 80 hours of no sleep I can't remember how.

Any suggestions?

Thanks.

Type in a bash shell (and also add it to /etc/bashrc):
export LANG=en_US

Then start the cpan again in that same shell, it's a bug in the default language setting in Redhat 9 and bash.., compilers don't like it :)
 
Re: active perl but how to continue

lona said:
Is active perl a good program to install the modules?
I downloaded it, but now I wonder how to continue as in ppm it says to type install and the name of the required module. Ok, but where to does ppm install it? On my own machine? That is not what I want. It needs to be installed on the server.

Or should i just give up as everything sounds to me as abracadabra.
is it easier to install DB file?

Lona
Active Perl is for Windows. If you want to use and run perl on a windows machine work away, but it won't help you get the perl modules onto your *nix box.
 
i am trying to add some perl modules, but i can get into cpan

[root@server01 root]# perl -MCPAN -e shell
Can't locate CPAN.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .).
BEGIN failed--compilation aborted.
[root@server01 root]#

is this not installed by default
 
hmm, comparing this server tpo another i miss A LOT perl modules :/...is there an easy way to add them? reinstall perl?
 
ok

done that
sorry, i am not into perl :(
cpan came with some questions, that i used the default answers too, is that ok?

now its finished and i see this:
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support available (try 'install Bundle::CPAN')

cpan>
is this for installing various perl modules?


--
now, if i want to add modules, what do i do?
 
Last edited:
Hello,

Going with the default for those questions should be fine :)

As for using CPAN, it is simple. Just find a package you want on cpan.org and type: install {package}
Where, of course, {package} is the package you've found :)

For instance: install CGI
That will install the CGI module.

Have fun ;)

Phi1.
 
lots of errors: for f.i. DBD-mysql-2.9003/

Code:
[root@server1 DBD-mysql-2.9003]# perl Makefile.PL
I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I'/usr/include'
  libs          (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 0
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testuser      (default     ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Multiple copies of Driver.xst found in: /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBI at Makefile.PL line 295
Using DBI 1.38 installed in /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI
Writing Makefile for DBD::mysql
[root@server1 DBD-mysql-2.9003]#

then make ;make install: doesn't install
Code:
[root@server1 DBD-mysql-2.9003]# make
gcc -c  -I/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI -I'/usr/include' -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   dbdimp.c
In file included from dbdimp.c:19:
dbdimp.h:21:49: mysql.h: No such file or directory
dbdimp.h:22:49: errmsg.h: No such file or directory
In file included from dbdimp.c:19:
dbdimp.h:106: parse error before "MYSQL"
dbdimp.h:106: warning: no semicolon at end of struct or union
dbdimp.h:117: parse error before '}' token
dbdimp.h:146: parse error before "MYSQL_RES"
dbdimp.h:146: warning: no semicolon at end of struct or union
dbdimp.h:159: parse error before '}' token
In file included from dbdimp.c:19:
dbdimp.h:195: parse error before '*' token
dbdimp.h:198: parse error before "MYSQL_RES"
dbdimp.h:202: parse error before '*' token
dbdimp.h:202: parse error before '*' token
dbdimp.h:203: warning: data definition has no type or storage class
dbdimp.c:121: parse error before '*' token
dbdimp.c: In function `ParseParam':
dbdimp.c:130: `slenPtr' undeclared (first use in this function)

etc etc

dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2300: dereferencing pointer to incomplete type
dbdimp.c:2303: dereferencing pointer to incomplete type
dbdimp.c:2303: dereferencing pointer to incomplete type
dbdimp.c:2303: warning: passing arg 3 of `mysql_dr_error' makes pointer from integer without a cast
dbdimp.c:2304: dereferencing pointer to incomplete type
dbdimp.c:2305: dereferencing pointer to incomplete type
dbdimp.c:2308: dereferencing pointer to incomplete type
dbdimp.c: In function `mysql_db_quote':
dbdimp.c:2444: dereferencing pointer to incomplete type
make: *** [dbdimp.o] Error 1
[root@server1 DBD-mysql-2.9003]#
long list
i have no idea whats wrong

same errors with these commands, or from cpan
 
Last edited:
Are you using RedHat 9 ?

If so, the LANG setting is screwed up, perl and C don't like the UTF-8 setting..

Try:
export LANG=en_US

And try again..
 
its redhat 9

after the command export LANG=en_US
i still get the same errors

some other modules do install though
 
maybe cause its installed already? do i have to remove the old version first, then install the new?
 
In general it should just upgrade it to the newest version..

try a:
make clean ; perl Makefile.PL ; make ; make install


If that fails, try d/ling the package again..
 
from with CPAN how can i delete a package

DBD::mysql is already there, only an older version
Maybe if i can remove that, i can install the new version
 
Uninstalling is a tad harder, the CPANPLUS module can most likely do that, but I have no experience with that.., it SHOULD just write over the existing modules if those are older..

I'm a bit out of options...
 
sander815 said:
lots of errors: for f.i. DBD-mysql-2.9003/

Code:
[root@server1 DBD-mysql-2.9003]# perl Makefile.PL
I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I'/usr/include'
  libs          (mysql_config) = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 0
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testuser      (default     ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

[/QUOTE] 

from my earlier post:
seems like it tries to login mysql? testdb, testhost, testpassword?

hmm
 
yep, that was the reason...it tries to connect to test db, but it can't, cause its pw protected
 
Back
Top