0

I tried to install a new version of BioPerl on my PC without root and get errors concerning too old versions of required modules. So I installed them into a custom directory.

Is there a possibility to set up a library parameter next to --install_base for the installation? README and INSTALL instructions just provide it for an installation using cpan, which is no option for me.

thanks

My attempts:

my $dir=catdir('home','user','my','bioperl');
my $lib=catdir('home','user','my','lib');
push @INC , $lib;
$lib=$lib.':'.$_ for @INC;

1.

system("cd tools/BioPerl-1.6.923 && perl Build.PL --install_base $dir && ./Build test && ./Build install");

2.

system("export EXPATLIBPATH=$lib && cd tools/BioPerl-1.6.923 && perl Build.PL --install_base $dir && ./Build test && ./Build install");

3.

system("export PERL5LIB=$lib && cd tools/BioPerl-1.6.923 && perl Build.PL --install_base $dir && ./Build test && ./Build install");
pyr0
  • 377
  • 1
  • 14
  • Why are you trying to install a Perl module from within a Perl program? Is it just a convenience, or is this part of a bigger Perl program? I would have thought a bash script would be more appropriate. Please explain what problem you are having. Does this approach not work? – Borodin May 22 '14 at 08:01
  • this is just a part of my program and can be done at bash as well. the message I get is this one: `Checking prerequisites... build_requires: ! Test::Most is not installed` and `Module::Build version 0.42 required--this is only version 0.4003` so I downloaded new versions of those modules and installed them into `/home/user/my/lib/perl5` – pyr0 May 22 '14 at 08:04
  • Okay, but surely you don't need to reinstall the module *every time* you run the program. You should start by installing `Test::Most` and updating `Module::Build`, as installing modules this way doesn't update the dependencies. Why can't you use `CPAN`? – Borodin May 22 '14 at 08:07
  • unfortunately, we are not allowed to have root and cpan is not installed, in addition I try to provide my software as easy to install as possible – pyr0 May 22 '14 at 08:08
  • Then at least you should provide a separate installation script. You shouldn't reinstall in each run. What are you expected to use if there is no `cpan`? Without it you have to resolve all dependencies manually, which is a poor idea. – Borodin May 22 '14 at 08:12
  • right :D but I don't have other options at the moment. by the way, those modules will be installed just once. – pyr0 May 22 '14 at 08:14
  • 2
    Then I would write a bash script that installs *all* non-core modules and dependencies, adds to `PERL5LIB` and exports it, and writes a command to do the export to `.profile` – Borodin May 22 '14 at 08:25
  • 1
    [Don't mess with system perl](https://metacpan.org/pod/App::perlbrew). Instead, use [perlbrew](https://metacpan.org/pod/App::perlbrew) to install your own Perl and any libraries you want. – Sinan Ünür May 22 '14 at 14:47

1 Answers1

0

Being without root access is a common issue, that's why there is perlbrew.

\curl -L http://install.perlbrew.pl | bash

Then just install cpanminus for use with perlbrew: Installing to local perl (perlbrew).

curl -L http://cpanmin.us | perl - App::cpanminus

That should enable you to have a stable environment for installing all your modules including Bio::Perl. Could just do the following or also read How do I install the latest BioPerl version when using perlbrew?

cpanm Bio::Perl
Community
  • 1
  • 1
Miller
  • 34,962
  • 4
  • 39
  • 60