When I installed CPAN::SQLite and set cpan opt use_sqlite to true, the next time I started cpan shell I got this error:

2025-07-08 12:40:23 (3.53 MB/s) - ‘/home/somian/.cpan/sources/modules/ +03modlist.data.gz.tmp11438’ saved [248/248] Database was generated on Mon, 07 Jul 2025 15:41:26 GMT Updating database file ... DBD::SQLite::db commit failed: database is +locked at /usr/local/lib/perl5/site_perl/CPAN/SQLite/Populate.pm line + 663, <DATA> line 268361. DBD::SQLite::db commit failed: database is locked at /usr/local/lib/pe +rl5/site_perl/CPAN/SQLite/Populate.pm line 663, <DATA> line 268361. Catching error: "system /usr/local/bin/perl -MCPAN::SQLite::META=setup +,update,check -e update failed: 2816 at /usr/local/lib/perl5/site_per +l/CPAN/SQLite/META.pm line 318.\cJ" at /usr/local/lib/perl5/5.40.1/CP +AN.pm line 397. CPAN::shell() called at -e line 1

EDIT

Oh, s**t. I had an earlier instance of CPAN's shell running in the background in a terminal. I'm writing this update very quickly so I can say NEVER MIND, before anyone decides to waste their time telling me what's wrong. ;-).


This is on Gnu/Linux, perl 5.40.1, CPAN.pm version 2.36. The error is repeatable; if I set use_sqlite via o conf, I will get the error.

I understand what a locked database is, although I haven't had to learn the specifics of database management (I've long been an "enthusiast" - self-taught - rather than a "professional" who would be required to know databases for w$rk). My questions are: has anyone else seen this error with CPAN? And, What's the magnitude of the performance penalty for not using SQLite with CPAN?

  Soren

Jul 08, 2025 at 18:11 UTC


In reply to DBD::SQLite::db commit failed: database is locked; cpan shell error by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.