【问题标题】:Couldn't install File::Path library with cpan无法使用 cpan 安装 File::Path 库
【发布时间】:2018-08-09 15:58:21
【问题描述】:

我无法使用cpan 安装File::Path 库。怎么了?

# perl -v

This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux

Copyright 1987-2017, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

# cpan -v
/usr/bin/cpan script version 1.66, CPAN.pm version 2.18

是否有其他方法可以使其安装或有一些解决方法?

# cpan install File::Path
Reading '/root/.cpan/Metadata'
  Database was generated on Thu, 01 Mar 2018 13:17:03 GMT
Running install for module 'File::Path'
CPAN: Digest::SHA loaded ok (v6.01)
CPAN: Compress::Zlib loaded ok (v2.074)
Checksum for /root/.cpan/sources/authors/id/J/JK/JKEENAN/File-Path-2.15.tar.gz ok
CPAN: YAML loaded ok (v1.24)
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.20180220)
Configuring J/JK/JKEENAN/File-Path-2.15.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for File::Path
Writing MYMETA.yml and MYMETA.json
  JKEENAN/File-Path-2.15.tar.gz
  /root/localperl/bin/perl Makefile.PL -- OK
Running make for J/JK/JKEENAN/File-Path-2.15.tar.gz
cp lib/File/Path.pm blib/lib/File/Path.pm
Manifying 1 pod document
  JKEENAN/File-Path-2.15.tar.gz
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/root/localperl/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Path-Class.t .. ok     
t/Path.t ........ ok       
t/Path_root.t ... 1/11 
#   Failed test 'created a directory not owned by 1:inpuu...'
#   at t/Path_root.t line 77.
#                   'unable to map inpuu to a gid, group ownership not changed:  at t/Path_root.t line 72.
# '
#     doesn't match '(?^s:unable to map 1 to a uid, ownership not changed:)'
# Looks like you failed 1 test of 11.
t/Path_root.t ... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/11 subtests 
t/Path_win32.t .. skipped: not win32
t/taint.t ....... ok   

Test Summary Report
-------------------
t/Path_root.t (Wstat: 256 Tests: 11 Failed: 1)
  Failed test:  8
  Non-zero exit status: 1
Files=5, Tests=214,  2 wallclock secs ( 0.05 usr  0.01 sys +  0.36 cusr  0.09 csys =  0.51 CPU)
Result: FAIL
Failed 1/5 test programs. 1/214 subtests failed.
make: *** [test_dynamic] Error 255
  JKEENAN/File-Path-2.15.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports JKEENAN/File-Path-2.15.tar.gz

【问题讨论】:

  • 哪个发行版??
  • Centos7, Perl 5.26.1

标签: perl cpan


【解决方案1】:

这个测试失败是centos 7上的一个已知问题,在RT上试试补丁。

https://rt.cpan.org/Public/Bug/Display.html?id=121967

【讨论】:

  • 我没有使用补丁的经验。请指教。
  • 您可以搜索 Web 以了解如何应用补丁程序。您可以查看补丁并找出第一列中的+- 的含义,然后手动编辑文件。
  • 没那么难。我做到了。谢谢!
  • 无需打补丁。由于这是测试中的错误(与模块中的错误相反),这是强制安装模块安全的少数情况之一。
猜你喜欢
  • 2017-04-08
  • 2018-04-20
  • 2020-05-07
  • 2011-06-15
  • 2022-01-01
  • 2018-02-17
  • 2020-07-16
  • 1970-01-01
  • 2019-04-11
相关资源
最近更新 更多