CPAN 无法安装 Algorithm::CurveFit

Posted

技术标签:

【中文标题】CPAN 无法安装 Algorithm::CurveFit【英文标题】:CPAN fails to install Algorithm::CurveFit 【发布时间】:2022-01-01 03:44:43 【问题描述】:

我正在尝试安装 Algorithm::CurveFit,只需在我的 Ubuntu VM 上的终端输入 cpan Algorithm::CurveFit

但是,这会返回以下错误:

Loading internal logger. Log::Log4perl recommended for better logging
Reading '/home/con/.local/share/.cpan/Metadata'
  Database was generated on Mon, 22 Nov 2021 14:17:02 GMT
Running install for module 'Algorithm::CurveFit'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.102)
Checksum for /home/con/.local/share/.cpan/sources/authors/id/S/SM/SMUELLER/Algorithm-CurveFit-1.05.tar.gz ok
CPAN: YAML loaded ok (v1.30)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20210520)
CPAN: Module::Build loaded ok (v0.4231)
Configuring S/SM/SMUELLER/Algorithm-CurveFit-1.05.tar.gz with Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Algorithm-CurveFit' version '1.05'
  SMUELLER/Algorithm-CurveFit-1.05.tar.gz
  /home/con/perl5/perlbrew/perls/perl-5.34.0/bin/perl Build.PL -- OK
Running Build for S/SM/SMUELLER/Algorithm-CurveFit-1.05.tar.gz
Building Algorithm-CurveFit
  SMUELLER/Algorithm-CurveFit-1.05.tar.gz
  ./Build -- OK
CPAN: CPAN::DistnameInfo loaded ok (v0.12)
Running Build test for SMUELLER/Algorithm-CurveFit-1.05.tar.gz
t/00pod.t ........ ok   
t/00podcover.t ... ok   
t/01basic.t ...... ok   
t/02bad_deriv.t .. 1/13 
#   Failed test at t/02bad_deriv.t line 50.
# Looks like you failed 1 test of 13.
t/02bad_deriv.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/13 subtests 

Test Summary Report
-------------------
t/02bad_deriv.t (Wstat: 256 Tests: 13 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=4, Tests=22,  1 wallclock secs ( 0.01 usr  0.01 sys +  0.50 cusr  0.04 csys =  0.56 CPU)
Result: FAIL
Failed 1/4 test programs. 1/22 subtests failed.
  SMUELLER/Algorithm-CurveFit-1.05.tar.gz
  ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports SMUELLER/Algorithm-CurveFit-1.05.tar.gz

如何查看摘要报告底部建议的reports

更重要的是,如何解决这些错误并安装Algorithm::CurveFit

【问题讨论】:

点击来自Algorithm::CurveFit的链接。在“问题”下报告了与您类似的失败,并且在“测试人员”下有许多红色条。 @choroba 确实,rt.cpan.org/Public/Bug/Display.html?id=121352 似乎表明 Ubuntu/Debian 版本 1.05 已损坏。我已经尝试过打开和关闭 perlbrew,并且 Algorithm::CurveFit 肯定是坏的。该软件包已 11 年未更新 【参考方案1】:

如果从包中下载的源文件CurveFit.pm 在某处符号链接到@INC,那么包Algorithm:::CurveFit 将正常工作(显然)。

然而CurveFit.pm 应该被修改为调用CurveFit,而不是Algorithm::CurveFit

【讨论】:

嗯,听起来您是在建议“强制安装”模块(通常使用 cpan -f Some::Module 完成)。强制安装不起作用的模块不是一个好主意...

以上是关于CPAN 无法安装 Algorithm::CurveFit的主要内容,如果未能解决你的问题,请参考以下文章

无法在 Linux 上使用 cpan/cpanm 安装 Net::Pcap

无法使用 CPAN 安装 Net::SSLeay: /bin/sh: x86_64-apple-darwin13.4.0-clang: command not found

有没有办法让操作系统在 CPAN 发行版中定义依赖关系?

centos环境下使用CPAN安装perl模块

perl cpan 安装与 GIT Perl cpan 安装冲突我该如何纠正?

修改CPAN安装源