2

I am trying to run the bioperl-live package and I have git-cloned the following repo

git clone https://github.com/bioperl/bioperl-live.git

and cd'd into bio-perl live where it was installed. I have then tried to run:

perl Build.PL

to which I get back:

Checking prerequisites...
  build_requires:
    !  Test::Most is not installed

so I have opened up a cpan shell and when i run from cpan:

cpan>install Test::Most

and repeat the build I get the same error. Would anyone mind cloning the above git repo ( found at https://github.com/bioperl/bioperl-live if you want to check yourself) and let me know if you are encountering the same problem.

note this doesn't happen for other Build.PL files in other packages - it runs fine. there must be something in that git repo that's corrupt/missing.

Thanks

update - when I run perl -wle 'use Test::Most'

I get:

Can't locate Test/Most.pm in @INC (@INC contains: /home/arron/src/bioperl-live /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12 /usr/local/lib/site_perl .) at -e line 1. BEGIN failed--compilation aborted at -e line 1.enter code here

Also configuring cpan to install as root and then installing Test::Most makes no difference. such a fuss!

brucezepplin
  • 9,202
  • 26
  • 76
  • 129

1 Answers1

1

I doubt this is a problem with bioperl. More likely the cpan command you're using is not installing for the perl you're using to run the Build.PL. So Test::Most is getting installed but not for your perl. You can confirm if Test::Most is installed with perl -wle 'use Test::Most'.

Check which cpan and which perl. They should have the same root path. ie. /usr/bin/cpan and /usr/bin/perl.

One possibility is you're running sudo cpan but just perl Build.PL. sudo may be changing your PATH and thus picking up a different cpan and a different perl. If you are doing sudo cpan be sure to do sudo which cpan.

You can check which perl cpan is installing to by typing ! print "$^X\n" at a cpan prompt. ! tells cpan to execute arbitrary perl code. $^X is a variable which holds the path to perl. Here's an example where cpan is installing for the correct perl.

$ cpan

cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.

cpan[1]> ! print "$^X\n"
/Users/schwern/perl5/perlbrew/perls/perl-5.16.2-threads/bin/perl
cpan[1]> q

$ which perl
/Users/schwern/perl5/perlbrew/perls/perl-5.16.2-threads/bin/perl

Also you should avoid running cpan as root and instead configure CPAN to install as root. You may need to sudo chown yourusername -R ~/.cpan in order for this to work because root probably owns your .cpan directory.

Schwern
  • 153,029
  • 25
  • 195
  • 336
  • sorry, what difference between `perl -wle 'use Test::Most'` and `perl -e 'use Test::Most'`? I never used this options before. Always use onle `-e` option – Suic Apr 24 '13 at 18:22
  • `-w` turns on warnings. `-l` sets `$\ ` to a newline, which makes `print` add a newline. – ikegami Apr 24 '13 at 18:52
  • @Schwern - please see my updated question to see the results of running perl -wle 'use Test::Most' – brucezepplin Apr 24 '13 at 19:46
  • @Suic `-wle` is my habit for command line programs, there's little reason to not use `-wl` so I always do. `-e` will work just as well. – Schwern Apr 25 '13 at 18:54
  • @brucezepplin Based on what you wrote, it is definitely not a bioperl issue. The cpan you're invoking is not installing to the perl you're using. It's for some other perl installed on the machine. Post the output of the various `which` commands and we can sort it out. You can also determine which perl the CPAN shell is using with `! print "$^X\n"` at the `cpan>` prompt. – Schwern Apr 25 '13 at 19:10