I'm working with SGE (Sun Grid Engine) to submit jobs to a grid. I also use perlbrew
to manage my installed Perl versions.
I wrote some short sh
scripts that I use to run a perl script which requires a specific Perl version (5.12.2), which look something like this:
#!/bin/bash
#$-S /bin/bash
source /home/dave/.bash_profile
/home/dave/perl5/perlbrew/bin/perlbrew switch perl-5.12.2
/home/dave/scripts/proc_12.pl --in=/home/dave/in/in.store --dir=/home/dave/in/dir2 --params=/home/dave/in/params.p
Now, when I submit a single job everything works fine, but when I submit many, I start getting perlbrew
related error messages, like:
ln: creating symbolic link `current' to `perl-5.12.2': File exists
ln: creating symbolic link `/home/dave/perl5/perlbrew/bin/cpan' to `/home/dave/perl5/perlbrew/perls/current/bin/cpan': File exists
ln: creating symbolic link `/home/dave/perl5/perlbrew/bin/cpan2dist' to `/home/dave/perl5/perlbrew/perls/current/bin/cpan2dist': File exists
ln: cannot remove `/home/dave/perl5/perlbrew/bin/cpanp': No such file or directory
ln: cannot remove `/home/dave/perl5/perlbrew/bin/enc2xs': No such file or directory
ln: cannot remove `/home/dave/perl5/perlbrew/bin/find2perl': No such file or directory
So I guess the /home/dave/perl5/perlbrew/bin/perlbrew switch perl-5.12.2
line is causing the problems.
What can I do?
How can I make my script run using perl-5.12.2 (the default is 5.8.8)?