underTheRadar has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to manually install the DBI module from CPAN using the command prompt on Windows 10.

After I downloaded the zip file in CPAN, I extracted it to the C: directory. When I typed in C:>cpan Module::DBI in the command prompt, it shows this line of error:

"Warning: Cannot install Module::DBI, don't know what it is"

What am I doing wrong?

************************************************************** MAJOR UPDATE************************************************************

I found out that the Strawberry installed in my computer is an old version.
So, I uninstalled it, downloaded and installed the latest version

And then, I successfully installed the DBI module

I'm sorry for wasting your time. Thank you very much for your help.

  • Comment on Error when installing cpan's DBI module in Strawberry Perl

Replies are listed 'Best First'.
Re: Error when installing cpan's DBI module in Strawberry Perl
by marto (Cardinal) on Feb 23, 2019 at 07:09 UTC

    Strawberry perl already ships with DBI, should you wish to upgrade it to a more recent version simply run the following from the command prompt:

    cpanm DBI

    Note cpanm rather than cpan, cpanm is a faster client.

Re: Error when installing cpan's DBI module in Strawberry Perl (updated)
by AnomalousMonk (Archbishop) on Feb 23, 2019 at 04:59 UTC
    I'm trying to manually install the DBI module from CPAN ... After I downloaded the zip file in CPAN ...

    Why are you trying to do that all that manually? Strawberry Perl comes with its cpan utility which (the last time I used it) involved a command line like
        cpan install Module::DBI
    (Update: Sorry, should have checked first. Actually, at the Windows DOS command prompt, type
        c:>cpan
    to start the Strawberry cpan shell, then at the shell prompt type
        cpan> h
    for "help" info. "install" is what you're looking for.)

    to do the dirty work.

    When I typed in C:>cpan Module::DBI ... "Warning: Cannot install Module::DBI, don't know what it is"

    I don't see any Module::DBI module on CPAN (actually MetaCPAN now); are you sure this is really the name of the module?


    Give a man a fish:  <%-{-{-{-<

Re: Error when installing cpan's DBI module in Strawberry Perl
by Athanasius (Archbishop) on Feb 23, 2019 at 04:17 UTC

      Thank you for your answer

      I downloaded cpanm and extracted it to the C directory

      Then, I typed in "C:\>cpanm install DBI" on the command prompt

      It somewhat worked. The module was being installed, up until an error showed up. It tells me to see a build log on the .cpanm directory.

      Upon finding the build log, I scrolled all the way down to find this error:
      "dmake.exe: Error code 129, while making 'Perl.o'"
      It is the same error I get if I install it using the cpan utility that the user AnomalousMonk suggested..

      Strangely, there is a line after I failed to install the module:
      "1 distribution installed"


      What should I do now?

        You shouldn't have to download cpanm. DWIM perl is a distro based on Strawberry (while old it should already have cpanm). Do you have multiple perl installations on your machine?

        Update:Also, DWIM perl seems down. reported, very quickly fixed by SZABGAB

        Please show other (10 or so) lines before dmake.exe: Error code 129, while making 'Perl.o' to provide more context.

Re: Error when installing cpan's DBI module in Strawberry Perl
by Anonymous Monk on Feb 23, 2019 at 06:34 UTC

    Use the string of DBI, not Module::DBI, if you want to install DBI module.