0

I tried giving the path for a bioinformatics application DistMap using perl. This is what I got.

[cloudera@localhost ~]$ perl DistMap_v1.0/distmap --mapper-path /home/cloudera/bwa-0.7.5a  /bwa
Can't locate Archive/Tar.pm in @INC (@INC contains: /home/cloudera/DistMap_v1.0/bin /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 /home/cloudera/DistMap_v1.0/bin/GenomeIndex.pm line 7.
BEGIN failed--compilation aborted at /home/cloudera/DistMap_v1.0/bin/GenomeIndex.pm line 7.
Compilation failed in require at DistMap_v1.0/distmap line 10.
BEGIN failed--compilation aborted at DistMap_v1.0/distmap line 10.

On googling it I found I am supposed to install a perl package Archive::Tar. My question is there any particular location where I have to extract this?

Thanks, Ashwin

Ashwin
  • 577
  • 3
  • 6
  • 15
  • 1
    Why not install the module with [CPAN](http://www.cpan.org/modules/INSTALL.html). – Carl Groner Sep 12 '13 at 04:12
  • Seems like CPAN is used for module installation. Currently I dont have CPAN. Can I know where is CPAN installed into? – Ashwin Sep 12 '13 at 04:21
  • What version of Linux are you using? – Carl Groner Sep 12 '13 at 04:29
  • download the tar.gz from here http://search.cpan.org/~bingos/Archive-Tar-1.92/lib/Archive/Tar.pm and do this http://stackoverflow.com/questions/540640/how-can-i-install-a-cpan-module-into-a-local-directory – KeepCalmAndCarryOn Sep 12 '13 at 04:29
  • I am using a VM of Red Hat – Ashwin Sep 12 '13 at 04:36
  • Cool I will do that and let you know soon.. – Ashwin Sep 12 '13 at 04:36
  • @KeepCalmAndCarryOn I didnt understand much from that link.. Here is what I got. I extracted Archive-Tar. Then go to that folder and run perl Makefile.PL PREFIX=./modulos make make install...and then modify MakeFile.pl with those 2 'use' statements. Am I right? and what does ./modulos stand for in PREFIX?? perl is located at /usr/bin/perl in my system. – Ashwin Sep 12 '13 at 04:50
  • try `perl Makefile.PL PREFIX=~/lib;make install` to install the module into a lib directory off your home directory, rather than the standard as you will need root access to install to the standard location. You don't need to change the file just use `export PERL5LIB=/home//lib/` – KeepCalmAndCarryOn Sep 12 '13 at 05:04
  • @Carl couldnt run CPAN for some reason. Though in most the sites it is adviced to use CPAN. – Ashwin Sep 12 '13 at 05:31

1 Answers1

0

So this is what I did to fix my problem. I extracted the latest Archive-Tar as mentioned in one of the comments above. Then, I executed these commands.

perl Makefile.Pl
make
make install

I somehow managed to execute my application after doing these steps. It would be great if anybody can explain what these steps mean as I am very much new to Perl and related topics.

Ashwin
  • 577
  • 3
  • 6
  • 15