简体   繁体   中英

Running BioPerl scripts in Wampserver

I am creating a page using wampserver on windows and work it locally. I want to access database Ensemble to obtain some useful info, such as a gene's sequence, and i'm running into the following problem:

I have installed ActivePerl and the API's required and my bioperl script runs perfectly from command prompt.

As fas as the wampserver is concerned, i have modifies httpd.conf in Apache to run perl scripts. A simple perl script (eg hello world) i can executed through wamp. (i stored id on www and go localhost/hello.pl)

When i want to run the script in wampserver for obtaining the sequence (more complex of course) i get this error:

install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: C:/wamp/bin/Perl/lib C:/wamp/bin/Perl/site/lib . C:/src/ensembl/modules) 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, Gofer, Proxy, Sponge. at C:/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1594

In command prompt window the script runs. How can i manage it to run it in wampserver??

Thanks for your help in advance

The @INC array contains all paths that Perl will look at to find modules. Currently, your WAMP Perl looks at these places:

C:/wamp/bin/Perl/lib
C:/wamp/bin/Perl/site/lib
.
C:/src/ensembl/modules

None of these directories contain a subdirectory DBD that in turn contains mysql.pm . (Please verify this with a file manager)

You seem to have this module installed with ActivePerl. Try to print out the @INC of that perl. If the ActivePerl @INC contains paths that are not included in your WAMP perl @INC (see above), then you should fix that to use your ActivePerl modules. Eg

use lib 'C:/foo/bar/lib';

before you use DBD::mysql . It might fix the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM