gpt4 book ai didi

perl - 无法为 perl 找到 Module/Build.pm

转载 作者:行者123 更新时间:2023-12-04 01:44:11 25 4
gpt4 key购买 nike

我不是 perl 专家(参见 this page ),但要使用包,我必须运行一些 perl 命令。该命令显示此错误

$ perl Build.PL
Can't locate Module/Build.pm in @INC (@INC contains: /home/mahmood/src/bioperl-1.6.1 /home/mahmood/src/ensembl/modules
/home/mahmood/src/ensembl-compara/modules /home/mahmood/src/ensembl-variation/modules
/home/mahmood/src/ensembl-funcgen/modules /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Build.PL line 20.
BEGIN failed--compilation aborted at Build.PL line 20.

我看到这个 reply它首先提供运行 cpan Module::Build 来修复该错误。当我运行该命令时,我看到了一堆问题(文本向导),它们询问我一个镜像 url。然后它以交互方式询问我是否允许安装这些软件包。问题的默认答案似乎有这样的效果。我也没有发现哪个问题对此负责。请在 pastebin 查看完整输出.

有什么方法可以自动安装模块,以便我可以将其放入脚本中以备将来使用。

更新:

似乎我必须输入 cpan.org 网址,但在我之前的尝试中,我使用了镜像网站。我尝试了回复中建议的三个命令,但仍然得到相同的错误:

Please enter the URL of your CPAN mirror  http://www.cpan.org
Configuration does not allow connecting to the internet.
Current set of CPAN URLs:
http://www.cpan.org
Enter another URL or RETURN to quit: []
New urllist
http://www.cpan.org


Please remember to call 'o conf commit' to make the config permanent!


cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.

cpan[1]> o conf build_requires_install_policy yes
build_requires_install_policy [yes]
Please use 'o conf commit' to make the config permanent!


cpan[2]> o conf prerequisites_policy follow
prerequisites_policy [follow]
Please use 'o conf commit' to make the config permanent!


cpan[3]> o conf commit
commit: wrote '/home/mahmood/.cpan/CPAN/MyConfig.pm'

cpan[4]> quit
No history written (no histfile specified).
Lockfile removed.
mahmood@cluster:Bio-DB-HTS$ perl Build.PL
Can't locate Module/Build.pm in @INC (@INC contains: /home/mahmood/src/bioperl-1.6.1 /home/mahmood/src/ensembl/modules /home/mahmood/src/ensembl-compara/modules /home/mahmood/src/ensembl-variation/modules /home/mahmood/src/ensembl-funcgen/modules /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Build.PL line 20.
BEGIN failed--compilation aborted at Build.PL line 20.

最佳答案

如果您想将 Module::Build 安装到您的系统库中,那么使用几乎肯定适用于您的系统的预构建包可能要容易得多。

如果您使用的是类似 RedHat 的 Linux 发行版,请尝试:

$ sudo yum install perl-Module-Build

(在较新版本的 Fedora 上尝试使用 dnf 而不是 yum。)

如果您使用的是类似 Debian 的 Linux 发行版,请尝试:

$ sudo apt-get install libmodule-build-perl

关于perl - 无法为 perl 找到 Module/Build.pm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44737871/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com