[ensembl-dev] "Can't locate DBD/mysql.pm in @INC" error

Arjun Ray aray at ebi.ac.uk
Thu Jul 12 11:23:39 BST 2012


Hi,

I am new to using the Ensembl API. This is the following error I am
getting (this would be my first attempt at the API).

###########
The API version used is 67
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
contains: /sw/lib/perl5 /sw/lib/perl5/darwin
/Users/rayarjun/src/bioperl-live /Users/rayarjun/src/ensembl/modules
/Users/rayarjun/src/ensembl-compara/modules
/Users/rayarjun/src/ensembl-variation/modules
/Users/rayarjun/src/ensembl-functgenomics/modules
/Users/rayarjun/src/bioperl-live /Users/rayarjun/src/ensembl/modules
/Users/rayarjun/src/ensembl-compara/modules
/Users/rayarjun/src/ensembl-variation/modules
/Users/rayarjun/src/ensembl-functgenomics/modules
/Library/Perl/Updates/5.10.0
/System/Library/Perl/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/5.10.0
/Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0
/Network/Library/Perl/5.10.0/darwin-thread-multi-2level
/Network/Library/Perl/5.10.0 /Network/Library/Perl
/System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.10.0 .) at (eval 5) 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, Gofer, Proxy, SQLite, Sponge.
 at /Users/rayarjun/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1576

##########################################

The script is pasted below :

#######################
use strict;
use warnings;

use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::ApiVersion;
printf( "The API version used is %s\n", software_version() );

my $registry = 'Bio::EnsEMBL::Registry';
$registry->load_registry_from_db(
   -host => 'ensembldb.ensembl.org',
   -user => 'anonymous',
   -port => 3306,
   -db_version => 67,
);

my $adaptor = $registry->get_adaptor( 'Human', 'Core', 'Transcript' );

my $transcript =
$adaptor->fetch_by_translation_stable_id('ENSP00000261584');

print $transcript->display_id."\n";

#####################


Regards

Arjun







More information about the Dev mailing list