|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Can't get past this problem installing DBD in Perl
I've downloaded the DBD package for perl ( 5.8.0 ) and cant get it to install. When I run the manual install I get:
[root@38-119 DBD-mysql-2.1018]# perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.61) ReadLine support available (try 'install Bundle::CPAN') cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Mon, 09 Sep 2002 23:52:11 GMT Running install for module DBD::mysql Running make for J/JW/JWIED/DBD-mysql-2.1018.tar.gz CPAN: Digest::MD5 loaded ok Checksum for /root/.cpan/sources/authors/id/J/JW/JWIED/DBD-mysql-2.1018.tar.gz ok Scanning cache /root/.cpan/build for sizes DBD-mysql-2.1018/ DBD-mysql-2.1018/t/ DBD-mysql-2.1018/t/mysql2.t DBD-mysql-2.1018/t/akmisc.t DBD-mysql-2.1018/t/60leaks.t DBD-mysql-2.1018/t/10dsnlist.t DBD-mysql-2.1018/t/ak-dbd.t DBD-mysql-2.1018/t/50chopblanks.t DBD-mysql-2.1018/t/mysql.t DBD-mysql-2.1018/t/lib.pl DBD-mysql-2.1018/t/40blobs.t DBD-mysql-2.1018/t/40nulls.t DBD-mysql-2.1018/t/insertid.t DBD-mysql-2.1018/t/40listfields.t DBD-mysql-2.1018/t/40bindparam.t DBD-mysql-2.1018/t/mysql.dbtest DBD-mysql-2.1018/t/dbdadmin.t DBD-mysql-2.1018/t/20createdrop.t DBD-mysql-2.1018/t/00base.t DBD-mysql-2.1018/t/30insertfetch.t DBD-mysql-2.1018/t/40numrows.t DBD-mysql-2.1018/t/50commit.t DBD-mysql-2.1018/t/mysql.mtest DBD-mysql-2.1018/MANIFEST DBD-mysql-2.1018/myld DBD-mysql-2.1018/dbdimp.c DBD-mysql-2.1018/dbdimp.h DBD-mysql-2.1018/mysql.xs DBD-mysql-2.1018/MANIFEST.SKIP DBD-mysql-2.1018/README DBD-mysql-2.1018/INSTALL.html DBD-mysql-2.1018/lib/ DBD-mysql-2.1018/lib/Mysql/ DBD-mysql-2.1018/lib/Mysql/Statement.pm DBD-mysql-2.1018/lib/DBD/ DBD-mysql-2.1018/lib/DBD/mysql/ DBD-mysql-2.1018/lib/DBD/mysql/INSTALL.pod DBD-mysql-2.1018/lib/DBD/mysql.pm DBD-mysql-2.1018/lib/DBD/mysql.pod DBD-mysql-2.1018/lib/Bundle/ DBD-mysql-2.1018/lib/Bundle/DBD/ DBD-mysql-2.1018/lib/Bundle/DBD/mysql.pm DBD-mysql-2.1018/lib/Mysql.pm DBD-mysql-2.1018/Makefile.PL DBD-mysql-2.1018/ChangeLog DBD-mysql-2.1018/constants.h Removing previously used /root/.cpan/build/DBD-mysql-2.1018 CPAN.pm: Going to build J/JW/JWIED/DBD-mysql-2.1018.tar.gz I will use the following settings for compiling and testing: cflags (mysql_config) = -I'/usr/local/mysql/include/mysql' libs (mysql_config) = -static -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm nocatchstderr (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'. Checking if your kit is complete... Looks good Warning: prerequisite DBI 1.08 not found. Unrecognized argument in LIBS ignored: '-static' Note (probably harmless): No library found for -lmysqlclient Can't locate DBI/DBD.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.0/i686-linux /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .) at Makefile.PL line 285. Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install cpan> So, the problem is 1) DBI not installed. I thought I had to install DBD to GET DBI ?? 2) it cannot fine a library 3) it can't locate DBI-DBD.pm |
|
#2
|
||||
|
||||
|
Start by installing DBI. You need DBI to use the MySQL specific DBD driver.
Think of the architecture thusly: perl->DBI->DBD::MySQL->MySQL RDBMS |
|
#3
|
|||
|
|||
|
Quote:
Thanks! I've installed the DBI package without problem. Now when I try to install the DBD package ( DBD-mysql-2.1018 ) by running: perl Makefile.PL make make test I get: [root@38-119 DBD-mysql-2.1018]# perl Makefile.PL I will use the following settings for compiling and testing: cflags (mysql_config) = -I'/usr/local/mysql/include/mysql' libs (mysql_config) = -static -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm nocatchstderr (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'. Unrecognized argument in LIBS ignored: '-static' Note (probably harmless): No library found for -lmysqlclient Using DBI 1.18 installed in /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI Writing Makefile for DBD::mysql [root@38-119 DBD-mysql-2.1018]# make cc -c -I/usr/local/lib/perl5/site_perl/5.8.0/i686-linux/auto/DBI -I'/usr/local/mysql/include/mysql' -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"2.1018\" -DXS_VERSION=\"2.1018\" -fpic "-I/usr/local/lib/perl5/5.8.0/i686-linux/CORE" dbdimp.c In file included from dbdimp.c:29: dbdimp.h:31:49: mysql.h: No such file or directory dbdimp.h:32:49: errmsg.h: No such file or directory make: *** [dbdimp.o] Error 1 Looks like it can't find header files for mysql. Any suggestions? |
|
#4
|
|||
|
|||
|
Additional Info-
I see that the script is guessing the wrong place for the mySQL libs and header files: cflags (mysql_config) = -I'/usr/local/mysql/include/mysql' libs (mysql_config) = -static -L/usr/local/mysql/lib/mysql They are actually in /usr/local/mysql/lib /usr/local/mysql/include Why would the Makefile.PL guess the wrong location? Where is it getting these variables? So I tried to override these on the command line. Seemed to run ok without error, but when I ran the make and it seemed to work. But when I ran 'make install' I had lots of failures. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Can't get past this problem installing DBD in Perl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|