我正在使用 SGE(Sun Grid Engine)将作业提交到网格。我也perlbrew
用来管理我安装的 Perl 版本。我编写了一些简短sh
的脚本,用于运行需要特定 Perl 版本 (5.12.2) 的 perl 脚本,如下所示:
#!/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
现在,当我提交一个作业时,一切正常,但是当我提交许多作业时,我开始收到perlbrew
相关的错误消息,例如:
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
所以我猜是这/home/dave/perl5/perlbrew/bin/perlbrew switch perl-5.12.2
条线导致了问题。
我能做些什么?
如何使用 perl-5.12.2(默认为 5.8.8)使我的脚本运行?