如何在不损坏系统安装的情况下安装较新的 Perl?
我看到很多人提到 Perl >= 5.12 中的一些很酷的新功能,但我最喜欢的 Linux Ubuntu 版本仅附带 5.10.1。
我不害怕 PPA,而且我知道如何谷歌(除非有人找到我的东西,然后我会感到不好意思)。我找不到提供 Perl PPA 的人;我以为一切都有 PPA!
我进一步担心的是,由于基于 Linux 的操作系统使用 perl
作为其打包和其他系统的一部分,我不一定想冒险自己编译/安装它,因为担心会破坏我的操作系统。
有人可以给我一些关于升级/并行安装最新 Perl 版本的最简单但仍然最安全的方法的指导吗?
- 我可以以一种不影响系统实用程序的好方式指定多个二进制文件吗?
- 如果安装了多个版本的 Perl,模块如何工作?
I have seen plenty of people mention some of the cool new features in Perl >= 5.12 but my preferred flavor of Linux Ubuntu only comes with 5.10.1.
I have no fear of PPAs and I know how to google (unless someone finds me something, then I'll feel sheepish). I cannot find someone that provides a Perl PPA; I thought there was a PPA for everything!
My further fear is that since linux-based OSes use perl
as part of their packaging and other systems I don't necessarily want to venture out on my own to compile/install it for fear of breaking my OS.
Can someone give me some guidance on the easiest while still safest way to upgrade/parallel-install the newest Perl versions?
- Can I specify multiple binaries in a good way to not affect system utilities?
- How do the Modules work if multiple versions of Perl are installed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议您看一下出色的 perlbrew,可从 CPAN 获取,它允许您在本地安装和管理多个 perl 版本。
I'd recommend taking a look at the excellent perlbrew, available from CPAN, which allows you to locally install and manage multiple perl versions.
你听起来更像是你试图替换 dist perl,你不想这样做。您想要安装一个单独的 perl。由于与 perls 相关的所有包袱,我通常将它们作为单独的用户安装在家里,然后像 /opt 或类似的东西导出。
You sound more like your trying to replace the dist perl, you don't want to do that. You want to install a separate perl. Because of all the baggage associated with the perls, I usually install them as a separate user in their home and then export out like a /opt or what not.
我所做的是,编译我自己的 perl 并将其安装在
/opt/perl
中。然后,我将export PATH=/opt/perl/bin:$PATH
添加到我的.bashrc
中。因此,系统 perl 保持不变,并且我可以使用最新的 perl。 :-)What I do is, compile my own perl and install it in
/opt/perl
. Then, I addexport PATH=/opt/perl/bin:$PATH
to my.bashrc
. Thus the system perl remains intact and I have the latest perl to play with. :-)