This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Breakdancer : Can't locate Statistics/Descriptive.pm in @INC while trying to run bam2cfg.pl

My command is as follows :

/data/tam/script/breakdancer-test-compile/lib/breakdancer-max1.4.5-unstable-66-4e44b43/bam2cfg.pl bwa1/bam/TTNR_bam_0-1000/libTTNRgenome_master_aln.bam.tmp.0000.bam

However, the error as follows appeared :

Can't locate Statistics/Descriptive.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /data/tam/script/breakdancer-test-compile/lib/breakdancer-max1.4.5-unstable-66-4e44b43/bam2cfg.pl line 7. BEGIN failed--compilation aborted at /data/tam/script/breakdancer-test-compile/lib/breakdancer-max1.4.5-unstable-66-4e44b43/bam2cfg.pl line 7.

I have read similar post related to adding path to INC but still didn't work.

Any idea what to do? Since I am quite new to linux, explaining from the basics would be much appreciated.

Thanks in advance.

breakdancer bam2cfg.pl inc perl

1 answer

I remember having a similar problem, it was because I had two versions of Perl installed so the paths got all messed up.

Is the Statistics/Descriptive module in one of the paths listed in @INC: /usr/local/lib64/perl5 OR /usr/local/share/perl5 OR /usr/lib64/perl5/vendor_perl OR /usr/share/perl5/vendor_perl OR /usr/lib64/perl5 /usr/share/perl5 ?

You can use perldoc to locate where you installed the Statistics/Descriptive module

perldoc -lm Statistics::Descriptive

I tried... and the result is

No module found for "Statistics::Descriptive".

And I am trying to install Statistics-Descriptive-3.0612 now but another error said I don't have permission to write...

ERROR: Can't create '/usr/local/share/man/man3'
Do not have write permissions on '/usr/local/share/man/man3'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at /usr/share/perl5/Module/Build/Base.pm line 2988

There is little info about this situation on google. Do you know how could I write or somehow install to another directory?

Thank you!

I will just say up front that I am really new to all this too...

Do you have root access on the system you are using, i.e. can you use sudo?

Maybe it would be easier to follow the instructions here to set up a new place where you can use CPANminus to install modules.

It worked!!! Thank you very much!!!

Log in to answer this question.