2012-02-21 25 views
2

尝试使用CPAN命令行时,我无法重新加载索引或安装任何模块。 SQLite有一个错误。如果我禁用了SQLite,我会得到一个不同的错误。两者都列在下面。有没有人发现过这个问题?你怎么修好它的?SQLite索引失败时如何解决cpan命令?

“” “使用SQLite” “”

Fetching with LWP: 
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz 
Fetching with LWP: 
http://cpan.strawberryperl.com/modules/03modlist.data.gz 
Creating database file ... 

Gathering information from index files ... 
fetch_info() failed! at C:\strawberry\perl\vendor\lib/CPAN/SQLite/Index.pm line 
57, <DATA> line 58. 
Indexing failed! at C:/strawberry/perl/vendor/lib/CPAN/SQLite.pm line 62, <DATA> line 58. CPAN::SQLite setup failed at C:/strawberry/perl/vendor/lib/CPAN/SQLite/META.pm l ine 329, <DATA> line 58. Catching error: "system C:\\strawberry\\perl\\bin\\perl.exe -MCPAN::SQLite::META =setup,update -e setup failed: 5632 at C:\\strawberry\\perl\\vendor\\lib/CPAN/SQ Lite/META.pm line 323.\cJ" at C:/strawberry/perl/lib/CPAN.pm line 391 CPAN::shell() called at C:/strawberry/perl/lib/App/Cpan.pm line 295 App::Cpan::_process_options('App::Cpan') called at C:/strawberry/perl/li b/App/Cpan.pm line 364 App::Cpan::run('App::Cpan') called at C:\strawberry\perl\bin/cpan line 8 """USERANDPASS""" 
Fetching with LWP: 
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz 
Fetching with LWP: 
http://cpan.strawberryperl.com/modules/03modlist.data.gz 
Creating database file ... 

Gathering information from index files ... 
fetch_info() failed! at C:\strawberry\perl\vendor\lib/CPAN/SQLite/Index.pm line 
57, <DATA> line 58. 
Indexing failed! at C:/strawberry/perl/vendor/lib/CPAN/SQLite.pm line 62, <DATA> 
line 58. 
CPAN::SQLite setup failed at C:/strawberry/perl/vendor/lib/CPAN/SQLite/META.pm l 
ine 329, <DATA> line 58. 
Catching error: "system C:\\strawberry\\perl\\bin\\perl.exe -MCPAN::SQLite::META 
=setup,update -e setup failed: 5632 at C:\\strawberry\\perl\\vendor\\lib/CPAN/SQ 
Lite/META.pm line 323.\cJ" at C:/strawberry/perl/lib/CPAN.pm line 391 
     CPAN::shell() called at C:/strawberry/perl/lib/App/Cpan.pm line 295 
     App::Cpan::_process_options('App::Cpan') called at C:/strawberry/perl/li 
b/App/Cpan.pm line 364 
     App::Cpan::run('App::Cpan') called at C:\strawberry\perl\bin/cpan line 8 

“” “没有SQLITE” “”

Going to read 'C:\strawberry\cpan\sources\modules\02packages.details.txt.gz' 
Warning: Your C:\strawberry\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:\strawberry\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["\cI<head>"] 
...Could not split line["\cI</head>"] 
Could not split line["\cI<body bgcolor=\"#ffffff\">"] 
Could not split line["\cI<script language=\"javascript\">"] 
Giving up parsing your C:\strawberry\cpan\sources\modules\02packages.details.txt 
.gz, too many errorsGoing to read 'C:\strawberry\cpan\sources\authors\01mailrc.t 
xt.gz' 
............................................................................DONE 

Going to read 'C:\strawberry\cpan\sources\modules\02packages.details.txt.gz' 
Warning: Your C:\strawberry\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:\strawberry\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["\cI<head>"] 
...Could not split line["\cI</head>"] 
Could not split line["\cI<body bgcolor=\"#ffffff\">"] 
Could not split line["\cI<script language=\"javascript\">"] 
Giving up parsing your C:\strawberry\cpan\sources\modules\02packages.details.txt 
.gz, too many errorsLockfile removed. 
+0

我以前没有遇到这个错误,但它看起来好像有些CPAN模块元数据可能已损坏。可能值得一试卸载,然后重新安装Strawberry Perl,然后查看错误是否仍然存在。 – 2012-02-21 14:45:12

+0

给了一枪,但它没有奏效。我不确定为什么SQLite无法正常工作,但我开始考虑在没有SQLite的情况下使用它是一个网络权利问题。临时文件正在拉出内部网错误页面,而不是它应该是的CPAN模块页面。 – steventnorris 2012-02-21 15:24:00

+0

嗯,我不熟悉CPAN的内部工作原理,但我相信它使用SQLite作为存储模块元数据的主要手段。我知道当你从命令行调用cpan并告诉它安装一个模块时,它会连接到'cpan.org'来下载模块。如果您的网络权限有限,那么这可能是一个问题。我建议与你的系统管理员交谈。 – 2012-02-21 15:43:58

回答

1

你并不需要重新安装草莓任何时候你有一个问题。我知道这是Windows,但生活比这更好。尝试删除C:\ strawberry \ cpan \ sources \ modules \ 02packages.details.txt.gz,看起来已损坏。如果CPAN.pm丢失,它应该重新下载它。

+0

我也是这样做的,这是一个全新的安装,所以我尝试了一个完整的重新安装以及删除损坏的文件。问题在于网络连接,至少在没有SQLite的情况下,网络防火墙正在以非授权用户的身份刻录该请求,即使拥有管理权限 – steventnorris 2012-02-21 16:07:48

+1

http://p3rl.org/CPAN#WORKING-WITH-CPAN.pm-BEHIND-防火墙 – daxim 2012-02-21 20:06:58

0

我有同样的问题,并在this网站上找到答案。这个问题可以通过暂时暂停CPAN使用SQLite,然后更新它使用它的模块来解决。从命令行:

cpan 
cpan> o conf use_sqlite 0 
cpan> o conf commit 
cpan> reload index 
cpan> install CPAN::SQLite 
cpan> o conf use_sqlite 1 
cpan> o conf commit 
cpan> ...