-1
我试图在共享Linux环境上安装CPAN
模块,但没有root权限,尤其是PDL::Graphics::Gnuplot
模块。默认的gnuplot版本是Version 3.7 patchlevel 3
,但版本Version 4.6 patchlevel 3
也被安装(/opt/gnuplot-4.6.3/bin/gnuplot
)。当试图安装Perl模块,在我的本地目录,它失败的测试:如何覆盖由Perl发起的shell中的系统命令?
unless(`gnuplot -V`)
我试图用别名来替代默认的gnuplot命令.bashrc
:
alias gnuplot='/opt/gnuplot-4.6.3/bin/gnuplot'
在常规shell我得到:
$gnuplot -V
gnuplot 4.6 patchlevel 3
但使用Perl:
$ perl -e 'system("gnuplot -V")'
Cannot open load file '-V'
line 0: (No such file or directory)
我该如何让Perl看到新版本的gnuplot?
在解决方案中,我想要更改模块中的Makefile
和以下文件中的系统命令。
非常好,两个选项都有效。 – hakanc