简体   繁体   中英

Can't install perl modules with cpan

I'm trying to install the Text::Template module with cpan but get this when I run 'install Text::Template' from the cpan shell.

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.

I'm using ActivePerl 5.28.1 64bit on Windows 10. The same problem occurs for all the packages I tried, including Log::Log4perl and Test::More.

I can replicate this by corrupting my sources/modules/02packages.details.txt.gz file.

Erase the files in the C:\\Perl64\\cpan\\sources\\modules directory and try again.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM