如何在SQLite索引失败时修复cpan命令?

时间:2012-02-21 14:40:41

标签: perl sqlite cpan

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

“”“WITH 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.

2 个答案:

答案 0 :(得分:1)

如果遇到问题,您无需重新安装草莓。我知道这是Windows,但生活比这更好。尝试删除 C:\ strawberry \ cpan \ sources \ modules \ 02packages.details.txt.gz ,它似乎已损坏。如果丢失,CPAN.pm应重新下载。

答案 1 :(得分:1)

我遇到了同样的问题,并在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> ...