在 Ubuntu 8 上将 Perl v5.8 升级到 Perl v5.10 [英] Upgrade Perl v5.8 to Perl v5.10 on on Ubuntu 8
问题描述
我已经按照以下安装命令在 /home/admin/localperl
位置安装了 Perl v5.10
I have installed the Perl v5.10
in /home/admin/localperl
location as per the below install commands
./Configure -des -Dprefix=$HOME/localperl
make test
make install
但是当我运行 $ perl -v
命令时,我仍然看到 perl, v5.8.8
而不是 Perl v5.10
>
But when I ran the $ perl -v
command am still seeing perl, v5.8.8
instead of Perl v5.10
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
我是 Windows 用户,在 Windows 世界中,我通常更改类路径以使其工作,但我不确定如何在 Ubuntu 8
世界中完成此操作,有人可以帮忙吗?
I am a windows user and in the windows world I usually change the class path to make it work, but am not sure how this can be done in Ubuntu 8
world, can someone please help?
推荐答案
那是因为 /bin
在您的路径中出现在 /home/admin/localperl/bin
之前.
That's because /bin
appears before /home/admin/localperl/bin
in your path.
将以下内容添加到您的登录脚本中:
Add the following to your login script:
export PATH="/home/admin/localperl/bin:$PATH"
(提供 Bourne shell 语法;根据需要调整.)
(Bourne shell syntax provided; adjust as needed.)
记住,应该使用这个 Perl 的脚本应该有以下 shebang 行:
Remember, the scripts that should use this Perl should have the following shebang line:
#!/home/admin/localperl/bin/perl
标准的 Perl 安装程序会在他们安装的脚本中自动将 #!/bin/perl
转换为上述内容.
The standard Perl installers will automatically convert #!/bin/perl
into the above in scripts they install.
这篇关于在 Ubuntu 8 上将 Perl v5.8 升级到 Perl v5.10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!