检查已安装的 perl 模块完整性的方法?

发布于 2024-10-24 04:40:21 字数 441 浏览 1 评论 0原文

我安装了 MacPorts 和 CPAN,但我刚刚发现同时使用它们有点不好。 我最近通过 CPAN 安装了 perl 5.13.9,因为它有一些程序需要的更新模块。该 perl 安装在 /usr/local/bin 中。然后,MacPorts 将其 perl 更新到 5.12.3 (/opt/local/bin),并抱怨无法完成安装,因为一些 .3pm 文件已经存在(例如 cpan.3pm)。我强制安装并将有问题的文件转移到 MacPorts 的备份名称中。下次我使用 CPAN 时,它会再次执行配置步骤,所以我想知道是否需要将这些文件移回,和/或重新/卸载 perl5.12.3/5.13.9。 最好在终端中发出命令来查看/测试所有模块是否仍然正常工作。总的来说,我想知道如何安全地结合 CPAN 和 MacPorts。

帮助?

在 OS X 10.6.6 上。

编辑

见下文。

I have MacPorts and CPAN installed and I've only just found out that it's sort of bad to be using them both at the same time.
I recently installed perl 5.13.9 via CPAN as it had some updated modules that a program wanted. That perl is installed in /usr/local/bin. MacPorts then updated its perl to 5.12.3 (/opt/local/bin) and complained that it couldn't complete the installation because some .3pm files already existed (e.g. cpan.3pm). I forced the install and MacPorts mv'd the offending files to a backup name. The next time I used CPAN it went through the configuration steps again so I'm wondering whether I need to mv those files back, and/or re/uninstall perl5.12.3/5.13.9.
It would be nice to issue a command in Terminal to see/test if all the modules are still working correctly. And in general, I'm wondering how to combine CPAN and MacPorts safely.

Help?

On OS X 10.6.6.

edit

See below.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冷︶言冷语的世界 2024-10-31 04:40:21

我修好了!供任何其他 MacPorts/CPAN 用户参考:

我最终从 MacPorts 中强制卸载了 perl5 和 CPAN,并清除了 ~/.cpan。 sudo find /opt -name cpan(或perl5)应该只会产生几个端口文件。

重新安装perl5。我还运行了 sudo port Upgrade outdated

从那时起,只通过MacPorts而不是CPAN安装perl模块。例如,Digest::SHA 在 MacPort 上是 p5-digest-sha。

对于仅在 CPAN 上可用的内容,请按照简单的说明使用 cpan2port 这里。

I fixed it! For reference for any other MacPorts/CPAN users:

I ended up force-uninstalling perl5 and CPAN from MacPorts, and purging ~/.cpan. A sudo find /opt -name cpan (or perl5) should result in nothing but a couple of portfiles.

Re-install perl5. I also ran a sudo port upgrade outdated.

From then on, only install perl modules via MacPorts instead of CPAN. For instance, Digest::SHA is p5-digest-sha on MacPorts.

For something only available on CPAN, use cpan2port by following the simple instructions here.

你是暖光i 2024-10-31 04:40:21

我个人喜欢集中管理系统,所以我会放弃额外的 Perl 并继续使用与系统更紧密集成的 Perl,这样更好维护。

如果您需要其他 Perl,则必须将它们分开保存。关于这一点,我在这里读到 brian d foy 很好的解释

如果你继续使用 Perl,但你需要从 CPAN 安装你自己的模型并避免与系统模型冲突,我建议 Chas。欧文斯的解决方案

I personally like to keep systems centrally managed, so i'd get rid of additional Perl and continue with one which is more closely integrated with system, so it is better to maintain.

If you need other Perl, you have to keep them separatley. About that i read here brian d foy great explanation

If you stay with one Perl, but you need to install your own modeles from CPAN and avoid conflicting with system ones, i'd suggest Chas. Owens's solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文