gpt4 book ai didi

perl - 使用 cpanp 安装 Perl 模块时如何跳过依赖项?

转载 作者:行者123 更新时间:2023-12-04 18:26:53 25 4
gpt4 key购买 nike

尝试使用 cpanp 安装 Apache::Singleton 时出现以下错误:

# cpanp i Apache::Singleton
Installing Apache::Singleton (0.15)
Running [/usr/bin/perl -e use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; } /root/.cpanplus/5.20.0/build/Apache-Singleton-0.15/Makefile.PL]...
[ info] generating script t/TEST
Generating a Unix-style Makefile
Writing Makefile for Apache::Singleton
Writing MYMETA.yml and MYMETA.json
[MSG] Module 'Apache::Singleton' depends on 'Apache::Test', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'ExtUtils::MakeMaker', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'Test::More', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
[MSG] Module 'Apache::Singleton' depends on 'mod_perl2', may need to build a 'CPANPLUS::Dist::Arch' package for it as well
==> Making package: perl-apache-singleton 0.15-1 (Wed Jun 4 22:32:47 FET 2014)
==> Checking runtime dependencies...
==> Missing dependencies:
-> perl-apache-test>=1.35
==> Checking buildtime dependencies...
==> Missing dependencies:
-> perl-apache-test>=0
==> ERROR: Could not resolve all dependencies.

但是 Apache::Test 已经安装了 mod_perl 包。我可以使用 perl -e 'use Apache::Test' 验证这一点。我如何告诉 cpanp 跳过此依赖项?

最佳答案

目前你不能跳过依赖,只是测试

cpanp i ... --skiptest

另一种安装“简单方法”的方法可能是 cpanm , 你有一个

cpanm ... --skip-installed

至少你总是可以只下载 .deb 文件(或 .rpm/.tgz,取决于你的发行版)并且只是提取它并将data.tgz(至少在.deb 文件中)提取到/

关于perl - 使用 cpanp 安装 Perl 模块时如何跳过依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24046661/

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