perl - 无法使用 cpan 安装 perl 模块
问题描述
我正在尝试使用 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。
解决方案
我可以通过破坏我的sources/modules/02packages.details.txt.gz
文件来复制它。
擦除C:\Perl64\cpan\sources\modules
目录中的文件,然后重试。
推荐阅读
- qt - “when”子句设置默认状态的 QML 状态更改
- r - dplyr 为每个类别选择前 10 个值
- scala - 斯卡拉。如何在成功时从 Future 获取值,在失败时抛出异常?
- python - 使用“brew install ansible”命令无法完美安装 ansible 在 MacOS 中不起作用?错误:-sh:/usr/local/bin/ansible:没有这样的文件或目录
- java - 在现有 java 项目的 Maven 构建期间找不到类断言符号
- java - 在 Java 11 上替换或使用 ShellFolder.getShellFolder() 的方式
- image - React Native 中响应式图像的分辨率(在手机和平板电脑上不模糊)
- javascript - 网络浏览器在什么时候准确地解除对交互事件的阻止?
- metasploit - 如何更正kali linux中metasploit上的“无数据库支持”警告
- python - 谷歌云平台、人工智能和机器学习产品,入门:使用 TensorFlow Estimator 进行训练和预测