Failed to install CPAN module on Strawberry Perl running Windows 7

I have Strawberry Perl installed on a Windows 7 system. Also you have a MinGW installation located in C: \ MinGW \ msys \ bin (where my make.exe is located). Strawberry is located in c: \ Strawberry \ Perl \ bin.

I am trying to set HTML :: TableContentParser to a local library and the script that installs the module fails with the error "cannot find the path specified" and tells me that I am building manually, I know how to do it and could not find instructions that work. It always goes back to the makefile.

This is what I get when I run "cpan HTML :: TableContentParser" from c: \ strawberry \ perl \ bin directory:

C:\Users\joel>cd c:\strawberry\perl\bin

c:\Strawberry\perl\bin>cpan HTML::TableContentParser
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: Storable loaded ok (v2.56_01)
Reading '\c\Users\joel\.cpan\Metadata'
  Database was generated on Mon, 15 May 2017 15:54:01 GMT
Running install for module 'HTML::TableContentParser'
CPAN: Digest::SHA loaded ok (v5.96)
CPAN: Compress::Zlib loaded ok (v2.07)
Checksum for \c\Users\joel\.cpan\sources\authors\id\S\SD\SDRABBLE\HTML-       TableContentParser-0.13.tar.gz ok
The system cannot find the path specified.
Uncompressed \c\Users\joel\.cpan\sources\authors\id\S\SD\SDRABBLE\HTML-TableContentParser-0.13.tar.gz successfully
Using Tar:/usr/bin/tar xf "HTML-TableContentParser-0.13.tar":
The system cannot find the path specified.
Couldn't untar HTML-TableContentParser-0.13.tar: child exited with value 1
CPAN: YAML loaded ok (v1.21)
  SDRABBLE/HTML-TableContentParser-0.13.tar.gz
  Had problems unarchiving. Please build manually

      

+3


source to share


1 answer


Try the following:

  • Don't use the standalone MinGW that comes with Strawberry Perl. Make sure you have the latest version of Strawberry Perl.

  • Download tar.gz for the perl module from any of the sites (Metacpan or Cpan).

  • Use winzip to unzip it, which will give you all the files extracted to the folder.

  • Now open a command prompt and change the directory to the one where you extracted tar.gz for the perl module.

  • Run the following commands:

    • perl Makefile.pl
    • dmake
    • Dmake test
    • dmake install

The dmake test command alone is optional, if you get errors try going to the next command and try using the module in your scripts. How many times a test fails does not mean the module will not install or work as expected. If there is an error, the module will also throw an error during installation.



Make sure the Makefile.pl file is in the extracted directory. This will install the module without any problem.

I am assuming you are on a Windows system. Let me know if you encounter any errors.

+2


source







All Articles