2

I am trying to run the bio-informatics tool OrthoMCL on Ubuntu 12.04. This tool needs a MySQL database for data processing. My SQL database is working well and is version 5.5.34. OrthoMCL contains some Perl scripts to run into command line. When I run a that uses the folowing modules I get the folowing error:

mark@CMBIPC34:~/Bureaublad/OrthoMCL/orthomclSoftware-v2.0.9/bin$ perl orthomclLoadBlast '/home/mark/Bureaublad/my_orthomcl_dir/orthomcl.config' '/home/mark/Bureaublad/my_orthomcl_dir/compliantFasta/similarSequences.txt'
DBD::MySql initialisation failed: Can't locate object method "driver" via package "DBD::MySql" at /usr/local/lib/perl/5.14.2/DBI.pm line 821, <F> line 14.

Perhaps the capitalisation of DBD 'MySql' isn't right. at /home/mark/Bureaublad/OrthoMCL/orthomclSoftware-v2.0.9/bin/../lib/perl/OrthoMCLEngine/Main/Base.pm line 56

The modules are:

use DBI;
use FindBin;
use lib "$FindBin::Bin/../lib/perl";
use OrthoMCLEngine::Main::Base;
use strict;

When I ran this script to test installed modules

use DBI;
print "Available DBI Drivers and Data Sources:\n\n";
@drivers;
    my @drivers=DBI->available_drivers('quiet');
    my @sources;
    foreach my $driver (@drivers) {
        print "$driver\n";
        @sources=eval { DBI->data_sources($driver) };
        if ($@) {
            print "\tError: ",substr($@,0,60),"\n";
        } elsif (@sources) {
            foreach (@sources) {
                print "\t$_\n";
            }
        } else {
            print "\tNo known data sources\n";
        }
    }

I get this result:

Available DBI Drivers and Data Sources:

DBM
    DBI:DBM:f_dir=Verwijzing naar Stage-documenten
    DBI:DBM:f_dir=my_orthomcl_dir
    DBI:DBM:f_dir=Dropbox
    DBI:DBM:f_dir=OrthoMCL
    DBI:DBM:f_dir=MySQL
    DBI:DBM:f_dir=.
    DBI:DBM:f_dir=mcl-12-068
ExampleP
    dbi:ExampleP:dir=.
File
    DBI:File:f_dir=Verwijzing naar Stage-documenten
    DBI:File:f_dir=my_orthomcl_dir
    DBI:File:f_dir=Dropbox
    DBI:File:f_dir=OrthoMCL
    DBI:File:f_dir=MySQL
    DBI:File:f_dir=.
    DBI:File:f_dir=mcl-12-068
Gofer
    No known data sources
Multiplex
    No known data sources
MySql
    Error: DBD::MySql initialisation failed: Can't locate object method
Proxy
    No known data sources
Sponge
    No known data sources
mysql
    DBI:mysql:information_schema

When I try in the command line into downloaded folder DBD-mysql-4.025 I get this errors:

perl Makefile.PL

no error

make

/usr/bin/ld: cannot find -lmysqlclient
collect2: ld gaf exit-status 1 terug
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Fout 1

make test

same error as make

make install

same error as make

I tried also installing by cpan[1]> install DBD::mysql and got this error:

/usr/bin/ld: cannot find -lmysqlclient
collect2: ld gaf exit-status 1 terug
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Fout 1
  CAPTTOFU/DBD-mysql-4.025.tar.gz
  /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
Failed during this command:
 CAPTTOFU/DBD-mysql-4.025.tar.gz              : make NO

Where can I find -lmysqlclient, I can't find the file on the hard disk of the computer.

The problem don't occure while running this test perl script:

 #!/usr/bin/perl -w
 use DBI;
 $dbh = DBI->connect('dbi:mysql:orthomcl','root','')
 or die "Connection Error: $DBI::errstr\n";
 $sql = "show tables";
 $sth = $dbh->prepare($sql);
 $sth->execute
 or die "SQL Error: $DBI::errstr\n";
 while (@row = $sth->fetchrow_array) {
 print "@row\n";
 }

In this case the tables of the database OrthoMCL will be displayed correcty without any error message.

I hope somebody can help me to solve this problem.

4

2 回答 2

4

“也许‘MySql’的大小写不对。”

你的connect陈述是否使用了正确的大小写?

$dbh = DBI->connect("dbi:mysql:...", ...);
于 2013-11-07T15:19:52.937 回答
0

最后我找到了解决方案。问题出在配置文件中:

dbConnectString=dbi:MySql:orthomcl:localhost:3306

不得不

dbConnectString=dbi:mysql:orthomcl:localhost:3306
于 2013-11-11T14:49:48.393 回答