【问题标题】:Can't install perl modules with cpan无法使用 cpan 安装 perl 模块
【发布时间】:2020-05-07 13:02:17
【问题描述】:

我正在尝试使用 cpan 安装 Text::Template 模块,但是当我从 cpan shell 运行“安装 Text::Template”时得到了这个。

cpan> install Text::Template
Reading 'C:\Perl64\cpan\sources\authors\01mailrc.txt.gz'
Use of uninitialized value $command in concatenation (.) or string at C:\Perl64\lib/CPAN/Tarzip.pm line 163, <IN> line 1.
'-qdt' is not recognized as an internal or external command,
operable program or batch file.
............................................................................DONE
Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz'
Use of uninitialized value $command in concatenation (.) or string at C:\Perl64\lib/CPAN/Tarzip.pm line 163.
'-qdt' is not recognized as an internal or external command,
operable program or batch file.
Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
.Could not split line["┬0\cL²\cU\c?└'¸\cCé"]
Could not split line["cÌX'ÔÒ"├█\cP\cE?▀&Ù┌╠5Ó%â¥mþlýBô¶ñg▒R\cIØ\cT\cPȸ\cX."]
Could not split line["\cH·©s:░KÉþ\cC\c^Û{65j¼¸\cL"]
Could not split line["\cD│í¬ð\cP|:ü▒HôU▓┴Bú‗Ð\cZyÄ"]
Giving up parsing your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz, too many errorsReading 'C:\Perl64\cpan\sources\authors\01mailrc.txt.gz'
Use of uninitialized value $command in concatenation (.) or string at C:\Perl64\lib/CPAN/Tarzip.pm line 163.
'-qdt' is not recognized as an internal or external command,
operable program or batch file.
............................................................................DONE
Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz'
Use of uninitialized value $command in concatenation (.) or string at C:\Perl64\lib/CPAN/Tarzip.pm line 163.
'-qdt' is not recognized as an internal or external command,
operable program or batch file.
Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Warning: Your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
.Could not split line["┬0\cL²\cU\c?└'¸\cCé"]
Could not split line["cÌX'ÔÒ"├█\cP\cE?▀&Ù┌╠5Ó%â¥mþlýBô¶ñg▒R\cIØ\cT\cPȸ\cX."]
Could not split line["\cH·©s:░KÉþ\cC\c^Û{65j¼¸\cL"]
Could not split line["\cD│í¬ð\cP|:ü▒HôU▓┴Bú‗Ð\cZyÄ"]
Giving up parsing your C:\Perl64\cpan\sources\modules\02packages.details.txt.gz, too many errorsLockfile removed.

我在 Windows 10 上使用 ActivePerl 5.28.1 64 位。我尝试的所有软件包都出现了同样的问题,包括 Log::Log4perl 和 Test::More。

【问题讨论】:

  • 你是如何安装 ActivePerl 的?
  • @HåkonHægland 使用 ActiveState,我下载了可执行文件。

标签: perl cpan


【解决方案1】:

我可以通过破坏我的 sources/modules/02packages.details.txt.gz 文件来复制它。

删除C:\Perl64\cpan\sources\modules目录中的文件,然后重试。

【讨论】:

  • 我试过这个并且得到了同样的错误。我设法使用草莓 perl 安装了该模块,所以我想我会改用它。
【解决方案2】:

我使用 Strawberry Perl 而不是 ActivePerl 让它工作。

【讨论】:

    猜你喜欢
    • 2011-06-15
    • 2019-04-11
    • 2017-08-28
    • 2013-06-30
    • 1970-01-01
    • 2016-06-16
    • 2016-07-11
    • 2018-02-17
    • 2020-07-16
    相关资源
    最近更新 更多