PDA

View Full Version : Problems with Perl DBD/DBI/XML-Parser installation



mrigank.mishra
October 4th, 2008, 04:04 AM
Hi!

I'm running into problems with the installation of perl DBD, Perl-DBI and Perl-XML-Parser.

First thing, as far as I reckon, the documentation doesn't talk about the secondary dependencies (Perl-DBD).

The problem I'm having is with when we install via the CPAN...
The install fails throwing an error, "Make return status bad. Install seems impossible."

Could somebody help me with that??

paddy
October 6th, 2008, 07:24 AM
It is difficult to figure out why CPAN install failed without more information. As I said before, we do not maintain mysql client or perl DBD/DBI perl modules.

It is easier to install from the distribution. Most linux distributions provide packaged version of perl-DBI and MySQL-perl-DBD modules.

What operating system are you using?

Paddy

mrigank.mishra
October 8th, 2008, 04:47 AM
I'm using a SuSe Enterprise Server 10 (32-bit). I have only the mysql client rpm installed on ZRM server along with the needed additional packages. I have both, the mysql server and the client rpms (5.0.67) installed on the MySQL server.

I installed the entire perl-DBI bundle from CPAN (doing this automatically takes care of the XML-parser). The CPAN install of DBD was failing so I installed perl-DBD-mysql 4.008 from the source with the following commands:
perl Makefile.PL --ssl --testuser=mysql_backup_usr --testpassword=pass123 --testhost=remote.mysql.net
make
make test
make install

Now when I do the perl -MCPAN -e 'install DBI' & perl -MCPAN -e 'install XML::Parser', it shows them as up-to-date..

So I thought the job was done and tried taking SSH-backup. It failed with this output:

Output of command: 'mysqlhotcopy' is {
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at (eval 8) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, SQLite, Sponge.
at /usr/bin/mysqlhotcopy line 177
mysqlhotcopy on host remote.mysql.net failed at /usr/share/mysql-zrm/plugins/ssh-copy.pl line 317.
}

Need help!

paddy
October 8th, 2008, 11:10 AM
Check whether you have installed the package in the correct location.

You could have installed the rpm from SLES10 distribution (Service Pack 2).
perl-DBD-mysql-3.0002-15.2.i586.rpm

Paddy

mrigank.mishra
October 14th, 2008, 04:23 AM
First off, a bit of advice! I suggest that you guys should provide the following code for installing DBI off CPAN:
perl -MCPAN -e 'install Bundle::DBD::mysql'
instead of:
perl -MCPAN -e 'install DBI'
The reason being that it takes care of the additional perl-DBD-mysql dependency and also the fact that DBI must be installed before DBD and not the other way round.. (caused me some problem!)

I have used rpms to install the MySQL client and the required libraries and header files. Also used an rpm to install the perl-DBD-mysql module.
I was able to install the DBI and XML parser modules through CPAN though.

While trying to install the DBD module make test failed showing "Cannot connect to local MySQL server through ../.sock" showing the absence of a local mysql database since I had only installed the MySQL client and consequently no local mysql database was present.

I got around this by manually installing and supplying the testdatabase, testuser and testpassword parameters to Makefile.PL during configure. Guess the thing would work also if we simply skipped the make test step.

But I'm not able to supply these parameters to the CPAN prompt hence the make test step for DBD::mysql is failing. Could you give me an example syntax for how to supply these parameters on the CPAN prompt??

When finally I got the thing to install then mysqlhotcopy begins throwing this error:
Output of command: 'mysqlhotcopy' is {
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5 /site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib /perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/l ib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at (eval 8) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, SQLite, Sponge.
at /usr/bin/mysqlhotcopy line 177
mysqlhotcopy on host remote.mysql.net failed at /usr/share/mysql-zrm/plugins/ss h-copy.pl line 317.
}

What does this mean?? I googled it and found another page that said we needed to install another module called Msql-Mysql-modules. Tried doing that with CPAN but that threw up error with Msql (not mysql) install saying that it needed perl version 5.0.61 or later.. I cross-checked - I had 5.8.8! Obviously I'm mighty confused!!!

I searched MySQL pages for perl dependency - it does talk about DBD (you guys DON'T! - I suggest you do..) It also says that MySQL won't work for perl < 5.0.61 or something similar..

Please help!!! SOS!!!!!! :-( :=((

paddy
October 14th, 2008, 01:36 PM
I have used rpms to install the MySQL client and the required libraries and header files. Also used an rpm to install the perl-DBD-mysql module.
I was able to install the DBI and XML parser modules through CPAN though.



It is not clear why you are not installing all perl modules from SLES10
distribution. All required packages are available in the DVD/CD. Installing from SLES10 rpms will put the packages in the correct perl directory.

Paddy

mrigank.mishra
October 14th, 2008, 08:41 PM
Because I am using Linux enterprize server 10 which has distros of 2005... Now that's PREHISTORIC (by linux standards) you see!!

Also, I had tried installing from the installation disc but that didn't fix the problem...

Regards,
Mrigank

paddy
October 15th, 2008, 06:33 AM
Because I am using Linux enterprize server 10 which has distros of 2005... Now that's PREHISTORIC (by linux standards) you see!!

Also, I had tried installing from the installation disc but that didn't fix the problem...

Regards,
Mrigank

We are using SLES10 SP2 in our test machines. Service Pack 2 was released last year. You can find these rpms in the package.

It is difficult to help you with MySQL perl modules because we do not maintain these modules. You should try posting MySQL DBD perl module questions in MySQL forums (http://forums.mysql.com).

Paddy

mrigank.mishra
October 15th, 2008, 08:50 PM
We are using SLES10 SP2 in our test machines.

It seems you are using a similar configuration as mine - Even I had the thing working earlier but that machine had a rather old install and consequently, a lot of installed packages, so I can not determine what made it work last time... A fresh install simply "recreates" the problem, whatever method one may try...

Could you please mention the list of required packages and how you would proceed to get a "working" install on a freshly installed SuSe?? Would be extremely thankful if you could.. :-)

I guess we need to have:

"C/C++ compiler tools" packages installed (I preferred to install the whole chunk instead of just the good old gcc.. :D)

Then we need perl-DBI, perl-XML-parser and finally perl-DBD-mysql.

Then we need the mysql client rpm (how to get around the "local database" that is required during make test when we install from cpan?? I wish to know the command syntax to pass the configuration options so that make test may access the test database on the remote mysql server with the backup_usr as username and the database password. Also need to give the --ssl option.. Could you please give me the cpan command syntax for doing this??)

And lastly ZRM..
Isn't it??!


Service Pack 2 was released last year. You can find these rpms in the package.
Yeah! Let me try with this thing as well...


It is difficult to help you with MySQL perl modules because we do not maintain these modules. You should try posting MySQL DBD perl module questions in MySQL forums.
Done that already (http://forums.mysql.com/read.php?11,230325,230325#msg-230325)... MySQL forums seem to be incredibly slow..!

mrigank.mishra
October 16th, 2008, 05:35 AM
Was finally able to supply the --testhost, testuser and testpasswors to the CPAN prompt through the o conf init command.

Now the install DBD::mysql is failing with the following error:
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base....................String found where operator expected at t/00base.t line 20, near "BAIL_OUT "Unable to load DBI""
(Do you need to predeclare BAIL_OUT?)
String found where operator expected at t/00base.t line 21, near "BAIL_OUT "Unable to load DBD::mysql""
(Do you need to predeclare BAIL_OUT?)
syntax error at t/00base.t line 20, near "BAIL_OUT "Unable to load DBI""
syntax error at t/00base.t line 21, near "BAIL_OUT "Unable to load DBD::mysql""
BEGIN not safe after errors--compilation aborted at t/00base.t line 22.
# Looks like your test died before it could output anything.
t/00base....................dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-6
Failed 6/6 tests, 0.00% okay

(Gives a list of tests performed or skipped)
..........
..........
..........
..........
..........

Running make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Writing /usr/lib/perl5/site_perl/5.8.7/i686-linux/auto/DBD/mysql/.packlist
Appending installation info to /usr/lib/perl5/5.8.7/i686-linux/perllocal.pod
/usr/bin/make install UNINST=1 -- OK

Could somebody suggest me what do I do with this??? HOW CAN I DISABLE "MAKE TEST"???

Would be extremely grateful if somebody could offer any help..

paddy
October 16th, 2008, 10:50 AM
See my response on Oct 8. Please use rpm to do the installation instead of building from CPAN. Unfortunately, we never built CPAN perl-DBD-MySQL for SLES10.
You can try SLES10 mailing lists for help.

Paddy