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 06-01-2003, 05:03 AM   #1
pigsy
LQ Newbie
 
Registered: May 2003
Posts: 7

Rep: Reputation: 0
Unhappy mysql::DBD make problems - help plz


Complete newbie here - I have installed RH9 Perl 5 and mysql 4 (I've done all this before on Windoze but never Linux). The last step - getting perl to talk to mysql is posing a problem. I've got DBI installed ok but when I try to install the DBD I get...

"Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.0/ExtUtils/Liblist/Kid.pm line 97.
.
.
Many lines just like this.
.
.
.
Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.0/ExtUtils/Liblist/Kid.pm line 97.
Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.0/ExtUtils/Liblist/Kid.pm line 97.
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 286
Using DBI 1.37 installed in /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI
Writing Makefile for DBD::mysql
Makefile:89: *** missing separator. Stop.
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Running install for module DBD::mysql
Running make for J/JW/JWIED/DBD-mysql-2.1026.tar.gz
Is already unwrapped into directory /root/.cpan/build/DBD-mysql-2.1026
Has already been processed within this session
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Bundle summary: The following items in bundle Bundle:BD::mysql had
installation problems:
Mysql DBD::mysql"

I've looked at the Kid.pm but it's way beyond my understanding. Can anyone point me in the right direction please?

Regards, Pigsy
 
Old 06-02-2003, 02:07 PM   #2
pigsy
LQ Newbie
 
Registered: May 2003
Posts: 7

Original Poster
Rep: Reputation: 0
This turns out to be a bug in RH9 (apparently).

It can be worked around by setting an environment variable before doing the install:

export LANG=C

simple huh?

Regards, Pigsy
 
Old 07-08-2003, 04:42 PM   #3
linuxhelpme
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
Unhappy

i am having same issue.
newbie to linux
can you tell me how to change that environment variable??

where is file and where do i type it in the file??

anywhere???


please help!!!!!!
 
Old 07-08-2003, 04:49 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Just type it at the console you are working from:
export LANG=C

You may want to put it at the end of "/etc/bashrc" this will set it each time you log in.
 
Old 07-08-2003, 05:09 PM   #5
linuxhelpme
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
thanks!!!!!

for the help.
ur the best.

that got me past one part and now i need to figure out this other piece!!
 
Old 07-15-2003, 11:14 AM   #6
excyberlabber
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Rep: Reputation: 0
This got me past one error and into another (or a long list of errors):

dbdimp.c:373: initializer element is not constant
dbdimp.c:373: (near initialization for `SQL_GET_TYPE_INFO_values[8]')
dbdimp.c:378: `FIELD_TYPE_LONGLONG' undeclared here (not in a function)

etc., etc. ...

dbdimp.c:2311: dereferencing pointer to incomplete type
(many of these)

anyone know what is going on?

Thanks!
 
Old 07-15-2003, 11:35 AM   #7
excyberlabber
LQ Newbie
 
Registered: Jul 2003
Posts: 4

Rep: Reputation: 0
note I am using:

Redhat 9
DBD-mysql-2.9002
 
Old 07-24-2003, 07:37 PM   #8
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Rep: Reputation: 30
I just came up with similar errors on a RH9 box. setting LANG=C overcomes the initial problem, but then I get the following:

<snip>
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
In file included from dbdimp.c:29:
dbdimp.h:116: parse error before "MYSQL"
dbdimp.h:116: warning: no semicolon at end of struct or union
dbdimp.h:127: parse error before '}' token
dbdimp.h:156: parse error before "MYSQL_RES"
dbdimp.h:156: warning: no semicolon at end of struct or union
dbdimp.h:169: parse error before '}' token
In file included from dbdimp.c:29:
dbdimp.h:206: parse error before '*' token
dbdimp.h:209: parse error before "MYSQL_RES"
dbdimp.h:213: parse error before '*' token
dbdimp.h:213: parse error before '*' token
dbdimp.h:214: warning: data definition has no type or storage class
dbdimp.c:131: parse error before '*' token
dbdimp.c: In function `ParseParam':
.
.
.
</snip>

So it looks like it's strugging to find some mysql headers, but beyond that I'm stumped. I'll continue to google for a solution tho.

christo
 
Old 07-25-2003, 01:51 PM   #9
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Try installing he mysql-devel package:
ftp://fr.rpmfind.net/linux/redhat/9/...4a-11.i386.rpm
 
Old 07-25-2003, 02:18 PM   #10
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Rep: Reputation: 30
Sorry chaps - I should have replied back...

That's just what I did. Well I installed the devel package and also one other (can't remeber which, but it was a dep req for the devel rpm).

Anyway, the DBD::Mysql installation no longer dies on missing libraries.. however, it attempts to run a test by connecting to a database (of it's own selection - the default mysql test database IIRC)... and it died with the old 'could not connect to mysq.sock' chestnut - however, I think that's prolly because I already had a mysqld process running.

Anyway, it all satisfied my curiosity over this issue with installing the mysql bundle from CPAN and I left it at that.

</ramble>

christo
 
Old 08-07-2003, 08:06 PM   #11
mmkp
LQ Newbie
 
Registered: Aug 2003
Posts: 1

Rep: Reputation: 0
I ran into the same problems mentioned in this thread using RH9 and mysql 4.0.14: Here is what I did to solve the problem with the help of this thread:
1) Did "export LANG=C" from bash shell
2) Add /usr/local/mysql/bin directory to the PATH, so that it can find mysql_config
3) Executed the following from bash shell
perl Makefile.PL --cflags=-I/usr/local/mysql/include/mysql --libs="-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm"
4) For some reason the Makefile it generated did not have the correct include path for mysql 4.0.14. The Makefile had the include path of /usr/local/mysql/include/mysql which is incorrect according to my installation. I changed the include path to /usr/local/mysql/include


Thanks everyone.

Manoj.
 
Old 09-03-2003, 01:36 AM   #12
exactasphere
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
Just one more quick thing to note if anyone else is having issues installing DBD::Mysql.

The default testing procedures for the script connect to mysql as root@localhost with no password. So if your mysql has a password set you will come up with almost 95% test failure.

I'm sure there are many ways to fix this but an easy way is to change you root pass to blank for the install.

just remember to change it back

Hope That helps

-Sam

Last edited by exactasphere; 09-03-2003 at 01:38 AM.
 
Old 02-09-2004, 06:22 PM   #13
eugeneblum
LQ Newbie
 
Registered: Feb 2004
Location: Guttenberg, NJ
Distribution: Red Hat Professional 9.0
Posts: 3
Blog Entries: 1

Rep: Reputation: 0
I succeeded in installing the Perl Module, DBD::mysql, on a Dell PC under
o Red Hat Linux 9.0 Professional
o Perl 5.8.0
o MySQL 4.0.17 - Standard
by the following procedure:

Having installed MySQL I installed these two MySQL rpm's.

MySQL-client-4.0.17-0.i386.rpm
MySQL-devel-4.0.17-0.i386.rpm

Then, at command-line, as "root" I executed these steps:
a) set LANG to C via "export LANG=C"
b) executed
perl -MCPAN -e"install 'DBD::mysql'" >Log.txt 2>&1

This failed to complete the install, since the "test suite" failed. Error messages
captured in Log.txt advised me to run "perl Makefile.PL --help"
"find / -name Makefile.PL -print" revealed that there were several Makefile.PL's
in my system. I
selected /root/.cpan/build/DBD-mysql-2.9003/Makefile.PL
which, from the names in its pathname, seemed to be appropriate.
I then executed:
perl /root/.cpan/build/DBD-mysql-2.9003/Makefile.PL --help
The output advised me on how to set the options in the following command
which were the subject of error messages in Log.txt above.
c) perl /root/.cpan/build/DBD-mysql-2.9003/Makefile.PL \
--testdb=test \
--testuser=root \
--testpassword=< my MySQL root password > \
--testhost=localhost
d) cd /root/.cpan/build/DBD-mysql-2.9003/
e) make
f) make test
g) make install

On completing Step g), I executed
perl -e"use DBD::mysql"
which completed without any error messages, indicating that the install of mysql.pm had
succeeded.

I then ran one of my Perl programs, which "uses" DBD::mysql. It completed successfully.

I do not develop as "root"; I develop as user "gene". When I logged in as "gene"; the
same Perl program which user "root" ran successfully, failed with a message that
DBD::mysql was inaccessible.

As user "roo".
I did a "find / -name mysql.pm -print >LS 2>&1" to locate all the mysql.pm modules in my
system and then modified file LS to do an "ls -l " on each mysql.pm pathname.

As user "gene", I executed ". ./LS". One of
the pathnames was inaccesssible to "gene". I became user root again and chmod'ed
this pathname to make it accessible to "gene"; logged back in as "gene" and found that
everything worked perfectly.

WARNING: In Step b) The mysql.pm directories that the "find" turns up in your system
may be somewhat different from the ones in my system. One might
rationally expect them to be the same, but, as my grandmother would
say, "About such things who can tell?"

I gather that
perl -MCPAN -e"install DBD::mysql" >Log.txt 2>&1
ftp's the complete set of files necessary to install mysql.pm into your system; unzips
the download; untar's the download; compiles the compilable parts of the download via
the C compiler; and then uses the downloaded Makefile.PL to generate a make file
complete the installation.

But unless you have the right testuser, testpassword, testuser, etc., the make file
doesn't work. That's the reason for Step c) above.

In this developer's humble opinion, this is an extraordinarily opaque and error-prone
procedure. I think
perl -MCPAN -e" install 'DBD::mysql''" should be transparent to the user
and with a little thoughtful design it probably could be made so.
 
Old 04-09-2004, 03:36 PM   #14
trughes
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Rep: Reputation: 0
DBI doesn't install

What is wrong with Linux now? Nothing works, anymore. This is progress?

I have upgraded from RedHat 7.2 to Fedora Core1. I have installed the MySQL-devel, typed export LANG=C

Try installing DBI, I type "make" and I get this:

gcc -c -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=\"1.42\" -DXS_VERSION=\"1.42\" -fPIC "-I/usr/lib/perl5/5.8.1/i386-linux-thread-multi/CORE" -Wall -Wno-comment Perl.c
/bin/sh: line 1: gcc: command not found

Any suggestions? Do I have to reinstall gcc.
 
Old 04-09-2004, 03:46 PM   #15
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
You can't really blame "linux" for this. Linux is ust the kernel.

I seriously doubt if you need to reinstall gcc, most likely you need to install it in the first place.

If gcc is installed then make sure that it's location is included in your PATH variable:
echo $PATH
 
  


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 01:42 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 07:53 AM
MySQL / DBD / DBI problems drowning Linux - Software 9 09-19-2005 01:01 AM
Problem with make test for DBD::MySQL on RedHat 9 dipshikha Linux - Software 0 04-18-2004 01:12 PM
Can't install DBD::mysql or DBD::Pg DogTags Mandriva 2 01-21-2004 08:13 AM


All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
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