LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-19-2004, 07:10 AM   #1
drowning
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core 1
Posts: 9

Rep: Reputation: 0
MySQL / DBD / DBI problems


I am trying to install perl-DBD-MySQL so that I can access mysql from perl cgi scripts. I have installed
mysql-server 4.0.20,
mysql-client 4.0.20,
perl-DBI 1.40-4,
perl-DBD-mysql 2.9003-4 and
mysql-shared-compat 4.0.20 (because DBD needed libmysqlclient.so.10).

Problem is it get the following error when executing a cgi script:

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.8.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /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.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1 .) at (eval 1) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ExampleP, Proxy, Sponge.
at ./accounts.cgi line 37

I know mysql is working as I can login and create db's and the sort.
I can only assume that the DBI and DBD versions I have installed are not compatible with either the version of perl or mysql that I am running.
If this is the case which vers of each should I be installing?

I am running Fedora Core 1
Perl v5.8.1

Is anybody able to tell me what I am doing wrong or what I am missing - or even better, how to fix this frustrating problem?


--------------------------------
Steve
 
Old 07-19-2004, 07:21 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Try installing with CPAN:
perl -MCPAN -eshell

If this is your first time using it then answer the config questions. Then at the "cpan>" prompt:
install DBD::mysql
 
Old 07-19-2004, 07:46 AM   #3
drowning
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the quick response.

I tried that but when attempting to install DBD::mysql it couldn't find certain things and therefore the end result was it didn't install it.

Would it advisable to uninstall all the above RPMS and install them using the command you mentioned above? if so is there a way of finding out the specific name of the package I want to install? Eg. will ">install mysql-server" work. I would assume I would have to enter the specific name of a package.

Sorry if these questions are stupid. I am relatively new to linux.
---------------------------------
Steve

Last edited by drowning; 07-19-2004 at 08:10 AM.
 
Old 07-19-2004, 08:39 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
I wouldn't uninstall the rpms. CPAN will only install perl modules. Saying "it couldn't find certain things and therefore the end result was it didn't install it." isn't really very helpful as there is know way for us to know what is going wrong. Perhaps you could copy and paste the exact output that was given to you. This makes it much easier to see why things went wrong.
 
Old 07-19-2004, 04:48 PM   #5
drowning
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Here's the output from the attempt:
--------------------
cpan> install DBD::mysql
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Sun, 18 Jul 2004 05:11:52 GMT
Running install for module DBD::mysql
Running make for R/RU/RUDY/DBD-mysql-2.9004.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for /root/.cpan/sources/authors/id/R/RU/RUDY/DBD-mysql-2.9004.tar.gz ok
Scanning cache /root/.cpan/build for sizes
DBD-mysql-2.9004/
DBD-mysql-2.9004/t/
DBD-mysql-2.9004/t/mysql2.t
DBD-mysql-2.9004/t/akmisc.t
DBD-mysql-2.9004/t/60leaks.t
DBD-mysql-2.9004/t/10dsnlist.t
DBD-mysql-2.9004/t/ak-dbd.t
DBD-mysql-2.9004/t/50chopblanks.t
DBD-mysql-2.9004/t/mysql.t
DBD-mysql-2.9004/t/lib.pl
DBD-mysql-2.9004/t/40blobs.t
DBD-mysql-2.9004/t/40nulls.t
DBD-mysql-2.9004/t/insertid.t
DBD-mysql-2.9004/t/40listfields.t
DBD-mysql-2.9004/t/40bindparam.t
DBD-mysql-2.9004/t/mysql.dbtest
DBD-mysql-2.9004/t/dbdadmin.t
DBD-mysql-2.9004/t/20createdrop.t
DBD-mysql-2.9004/t/00base.t
DBD-mysql-2.9004/t/30insertfetch.t
DBD-mysql-2.9004/t/40numrows.t
DBD-mysql-2.9004/t/50commit.t
DBD-mysql-2.9004/t/mysql.mtest
DBD-mysql-2.9004/MANIFEST
DBD-mysql-2.9004/myld
DBD-mysql-2.9004/dbdimp.c
DBD-mysql-2.9004/lib/
DBD-mysql-2.9004/lib/DBD/
DBD-mysql-2.9004/lib/DBD/mysql/
DBD-mysql-2.9004/lib/DBD/mysql/GetInfo.pm
DBD-mysql-2.9004/lib/DBD/mysql/INSTALL.pod
DBD-mysql-2.9004/lib/DBD/mysql.pm
DBD-mysql-2.9004/lib/Mysql/
DBD-mysql-2.9004/lib/Mysql/Statement.pm
DBD-mysql-2.9004/lib/Bundle/
DBD-mysql-2.9004/lib/Bundle/DBD/
DBD-mysql-2.9004/lib/Bundle/DBD/mysql.pm
DBD-mysql-2.9004/lib/Mysql.pm
DBD-mysql-2.9004/dbdimp.h
DBD-mysql-2.9004/mysql.xs
DBD-mysql-2.9004/MANIFEST.SKIP
DBD-mysql-2.9004/README
DBD-mysql-2.9004/INSTALL.html
DBD-mysql-2.9004/META.yml
DBD-mysql-2.9004/Makefile.PL
DBD-mysql-2.9004/ChangeLog
DBD-mysql-2.9004/constants.h
DBD-mysql-2.9004/TODO
Removing previously used /root/.cpan/build/DBD-mysql-2.9004

CPAN.pm: Going to build R/RU/RUDY/DBD-mysql-2.9004.tar.gz

Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help
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>
---------------
I have done a locate mysql_config but it (obviously) doesn't exist.

--------------------------------------------
Steve
 
Old 07-19-2004, 04:55 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
mqsql_config should come with the mysql client. How did you install mysql?
 
Old 07-19-2004, 05:16 PM   #7
drowning
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Firstly I installed MySQL-server-4.0.20-0.i386.rpm
Code:
rpm -i MySQL-server-4.0.20-0.i386.rpm
Secondly I installed MySQL-client-4.0.20-0.i386.rpm
Code:
rpm -i MySQL-client-4.0.20-0.i386.rpm
Then I created a root password
Code:
/usr/bin/mysqladmin -u root password passwd
Did I miss a package?

--------------------------------------------
Steve
 
Old 07-20-2004, 04:17 AM   #8
drowning
LQ Newbie
 
Registered: Jul 2004
Distribution: Fedora Core 1
Posts: 9

Original Poster
Rep: Reputation: 0
Does anybody have MySQL, perl-DBD-MySQL and perl-DBI running on Fedora Core? If so what versions are you using. I'll try anything.

All help is appreciated
-------------------------------------------------
Steve
 
Old 11-30-2004, 04:59 AM   #9
kaN5300
LQ Newbie
 
Registered: Sep 2004
Location: Russia
Distribution: Slackware linux 10
Posts: 27

Rep: Reputation: 15
For DBD-mysql u must edit Makefile.PL to fix a path to ur mysql_config program =)
 
Old 09-19-2005, 12:01 AM   #10
NomadX
Member
 
Registered: Jul 2005
Location: Portland, OR
Distribution: Debian Testing
Posts: 78

Rep: Reputation: 15
an old thread but....

You must install the mysql-dev package to get mysql_config ... dont ask me what its called on fedora because I use debian
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 12:42 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 06:53 AM
PostgreSQL 8 and DBI, DBD::Pg rnturn Linux - Software 1 02-22-2005 02:30 AM
mysql::DBD make problems - help plz pigsy Linux - Software 15 04-17-2004 02:48 PM
Can't install DBD::mysql or DBD::Pg DogTags Mandriva 2 01-21-2004 07:13 AM


All times are GMT -5. The time now is 10:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration