Strawberry Perl v5.30.0 not able to install Tcl (Windows 10) - perl

I downloaded and installed strawberry-perl-5.30.0.1-64bit.msi from strawberryperl.com on my Windows 10 and tried to install Tcl module using cpan, but it fails for missing tclsh. What could be the problem?
C:\Strawberry>cpan Tcl
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.217)
Database was generated on Thu, 24 Oct 2019 12:40:15 GMT
Running install for module 'Tcl'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.086)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\V\VK\VKON\Tcl-1.27.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.32)
CPAN: YAML::XS loaded ok (v0.78)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190522)
Configuring V/VK/VKON/Tcl-1.27.tar.gz with Makefile.PL
'tclsh' is not recognized as an internal or external command,
operable program or batch file.
error starting tclsh: $?=256; $!=
No 'Makefile' created VKON/Tcl-1.27.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Tcl'.
C:\Strawberry>dir C:\Strawberry\cpan\build\Tcl-1.27-0
Volume in drive C is OSDisk
Volume Serial Number is BCC0-703E
Directory of C:\Strawberry\cpan\build\Tcl-1.27-0
25.10.2019 13.05 <DIR> .
25.10.2019 13.05 <DIR> ..
14.07.2018 11.00 5 207 Changes
22.08.2018 11.21 10 139 Makefile.PL
22.08.2018 11.45 1 723 MANIFEST
22.08.2018 11.45 1 140 META.json
22.08.2018 11.44 617 META.yml
14.07.2018 20.26 1 246 README
25.10.2019 13.05 <DIR> t
25.10.2019 13.05 <DIR> tcl-core
22.08.2018 11.43 43 540 Tcl.pm
22.08.2018 10.57 46 049 Tcl.xs
16.06.2018 15.18 439 tclcfg.tcl
16.06.2018 15.18 48 typemap
10 File(s) 110 148 bytes
4 Dir(s) 316 953 681 920 bytes free

You can build the missing dependency tclsh by downloading the source distribution from https://prdownloads.sourceforge.net/tcl/tcl8420-src.zip. To compile the source you need a C compiler. I tried the community edition of visual studio:
https://visualstudio.microsoft.com/vs/
Click download community edition..
Then choose what to install
Then click "Install"
After installation, go to menu "Tools->Command Line->Developer Command Prompt" and run
nmake -f makefile.vc
from the win sub folder of the extracted Tcl source distribution (on my computer it was located at C:\Users\Bruker\tcl\tcl8.4.20\win)
The above nmake command creates a new folder Release_VC13 with an executable file tclsh84.exe. Note that the name of the executable is not tclsh.exe.
Now add the folder of the executable to the system PATH environment variable:
C:\Users\Bruker\tcl\tcl8.4.20\win\Release_VC13, then close the command prompt and reopen again to refresh the path settings.
Try type tclsh84, and you should get a tcl shell command prompt with a leading % prompt. Then type exit to exit the tcl shell.
The next problem is to install the Tcl module using Strawberry perl. Trying first to run:
> cpan Tcl
[...]
'tclsh' is not recognized as an internal or external command,
operable program or batch file.
error starting tclsh: $?=256; $!=
No 'Makefile' created VKON/Tcl-1.27.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Tcl'.
The problem is that the executable is not called tclsh but tclsh84 (see above).
The next thing I did was to download the source distribution for the Tcl module:
> cpan -g Tcl
Then extracted the downloaded file Tcl-1.27.tar.gz and changed to the source distribution directory. By inspecting the Makefile.PL I found that the Makefile.PL took a command line argument --tclsh that gave the name of the tcl shell command. So I tried:
> perl Makefile.PL --tclsh=tclsh84
and this worked fine now. Then I tried to compile with gmake (which comes with the Strawberry Perl distribution):
> gmake
This also worked, but running gmake test failed, and also installing and testing the module:
> gmake install
> perl -MTcl -e1
failed dlopen(C:/Users/Bruker/tcl/tcl8.4.20/win/Release_VC13/tcl84.dll,...);
failed dlopen(./tcl84.dll,...);
failed dlopen(tcl84.dll,...);
trying dlopen(tcl89.dll,...)
trying dlopen(tcl88.dll,...)
trying dlopen(tcl87.dll,...)
trying dlopen(tcl86.dll,...)
trying dlopen(tcl85.dll,...)
trying dlopen(tcl84.dll,...)
trying dlopen(tcl83.dll,...)
trying dlopen(tcl82.dll,...)
trying dlopen(tcl81.dll,...)
trying dlopen(tcl80.dll,...)
failed all posible tcl vers 8.x from 9 down to 0 at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Failed to load Tcl dll! at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Unable to initialize Tcl at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Compilation failed in require.
BEGIN failed--compilation aborted.
I plan to come back to this problem later and investigate further.

Related

dmake is not recognized command when installing module from CPAN [duplicate]

This question already has an answer here:
dmake not found when installing Perl module using CPAN
(1 answer)
Closed 2 years ago.
When trying to install Win32::API from CPAN using Active Perl, the installation isn't successful. The problems stem from the following error:
'dmake' is not recognized as an internal or external command,
How can I resolve this problem?
Full output of cpan Win32::API:
Loading internal logger. Log::Log4perl recommended for better logging
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Sat, 21 Mar 2020 04:17:03 GMT
CPAN: LWP::UserAgent loaded ok (v6.31)
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.69)
Reading 'C:\Perl64\cpan\sources\authors\01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.092)
............................................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz
Reading 'C:\Perl64\cpan\sources\modules\02packages.details.txt.gz'
Database was generated on Sun, 22 Mar 2020 05:41:03 GMT
.............
New CPAN.pm version (v2.27) available.
[Currently running version is v2.20]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............................................................DONE
Fetching with LWP:
http://ppm.activestate.com/CPAN/modules/03modlist.data.gz
Reading 'C:\Perl64\cpan\sources\modules\03modlist.data.gz'
DONE
Writing C:\Perl64\cpan\Metadata
Running install for module 'Win32::API'
CPAN: Digest::SHA loaded ok (v6.01)
Checksum for C:\Perl64\cpan\sources\authors\id\B\BU\BULKDD\Win32\Win32-API-0.84.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.30)
Win32-API-0.84/
....
Win32-API-0.84/Type.pm
Win32-API-0.84/TYPEMAP
Win32-API-0.84/typemap56
Win32-API-0.84/W32ATest.pm
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20181129_28)
Configuring B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Encode::compat 0 not found.
Warning: prerequisite Math::Int64 0 not found.
Writing MYMETA.yml and MYMETA.json
Generating a dmake-style Makefile
Writing Makefile for Win32::API
Writing MYMETA.yml and MYMETA.json
BULKDD/Win32/Win32-API-0.84.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz
---- Unsatisfied dependencies detected during ----
---- BULKDD/Win32/Win32-API-0.84.tar.gz ----
Encode::compat [build_requires]
Math::Int64 [build_requires]
Running install for module 'Encode::compat'
Checksum for C:\Perl64\cpan\sources\authors\id\A\AU\AUTRIJUS\Encode-compat-0.07.tar.gz ok
....
Encode-compat-0.07/META.yml
Encode-compat-0.07/Changes
Encode-compat-0.07/t/
Encode-compat-0.07/t/1-basic.t
Encode-compat-0.07/t/0-signature.t
Encode-compat-0.07/MANIFEST
Encode-compat-0.07/SIGNATURE
Encode-compat-0.07/Makefile.PL
Encode-compat-0.07/README
Configuring A/AU/AUTRIJUS/Encode-compat-0.07.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Encode::compat
Writing MYMETA.yml and MYMETA.json
AUTRIJUS/Encode-compat-0.07.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK
Running make for A/AU/AUTRIJUS/Encode-compat-0.07.tar.gz
'dmake' is not recognized as an internal or external command,
operable program or batch file.
AUTRIJUS/Encode-compat-0.07.tar.gz
dmake -- NOT OK
Running install for module 'Math::Int64'
Checksum for C:\Perl64\cpan\sources\authors\id\S\SA\SALVA\Math-Int64-0.54.tar.gz ok
Math-Int64-0.54/
Math-Int64-0.54/COPYING
Math-Int64-0.54/Changes
.....
Configuring S/SA/SALVA/Math-Int64-0.54.tar.gz with Makefile.PL
Using IV backend
fileparse(): need a valid pathname at C:/Perl64/site/lib/ExtUtils/CBuilder/Base.pm line 50.
Checking for stdlib.h... Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
SALVA/Math-Int64-0.54.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
BULKDD/Win32/Win32-API-0.84.tar.gz
Has already been unwrapped into directory C:\Perl64\cpan\build\Win32-API-0.84-2
BULKDD/Win32/Win32-API-0.84.tar.gz
Has already been prepared
Running make for B/BU/BULKDD/Win32/Win32-API-0.84.tar.gz
Warning: Prerequisite 'Encode::compat => 0' for 'BULKDD/Win32/Win32-API-0.84.tar.gz' failed when processing 'AUTRIJUS/Encode-compat-0.07.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Math::Int64 => 0' for 'BULKDD/Win32/Win32-API-0.84.tar.gz' failed when processing 'SALVA/Math-Int64-0.54.tar.gz' with 'writemakefile => NO 'C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site' returned status 6400'. Continuing, but chances to succeed are limited.
'dmake' is not recognized as an internal or external command,
operable program or batch file.
BULKDD/Win32/Win32-API-0.84.tar.gz
dmake -- NOT OK
I have ActivePerl and was able to install (some) modules. I am using MinGW, and all I had to do is to copy it's make and rename the copy dmake.exe. That did it for me.
Alternatively, there is a way to tell CPAN which make to use: in cpan, use the command
cpan> o conf make <your make path and executable>
I got this answer from this post. I did encounter a different problem with other modules.
This worked fine for me with Strawberry Perl, Windows 10:
> perl --version
This is perl 5, version 30, subversion 1 (v5.30.1) built for MSWin32-x64-multi-thread
> cpan Win32::API
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.217)
CPAN: LWP::UserAgent loaded ok (v6.42)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.80)
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 ... Done!
CPAN: Module::CoreList loaded ok (v5.20191120)
Win32::API is up to date (0.84).
Then created script file p.pl:
use strict;
use warnings;
use Win32::API;
my $GetCommandLine = Win32::API->new('kernel32', 'LPTSTR GetCommandLine()');
my $val = $GetCommandLine->Call();
print "The command line of this program is: $val\n";
And run the test:
> perl p.pl
The command line of this program is: perl p.pl

C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK

The command is failing to execute while trying to install package through below command. Please note that I'm trying to configure Bugzilla version 5.0.4 on Windows 10 using Perl version 5.26.
cpan DBD::mysql
Complete Command Response:
PS D:\Workspace\bugzilla-5.0.4> cpan DBD::mysql
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: Term::ANSIColor loaded ok (v4.06)
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Mon, 15 Oct 2018 00:29:03 GMT
Running install for module 'DBD::mysql'
CPAN: Digest::SHA loaded ok (v5.98)
CPAN: Compress::Zlib loaded ok (v2.074)
Checksum for C:\Perl64\cpan\sources\authors\id\M\MI\MICHIELB\DBD-mysql-4.048.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.26)
DBD-mysql-4.048/
DBD-mysql-4.048/MANIFEST.SKIP
DBD-mysql-4.048/Makefile.PL.embedded
DBD-mysql-4.048/myld
DBD-mysql-4.048/mysql.xs
DBD-mysql-4.048/constants.h
DBD-mysql-4.048/dbdimp.c
DBD-mysql-4.048/Changes
DBD-mysql-4.048/MANIFEST
DBD-mysql-4.048/lib/
DBD-mysql-4.048/lib/Bundle/
DBD-mysql-4.048/lib/Bundle/DBD/
DBD-mysql-4.048/lib/Bundle/DBD/mysql.pm
DBD-mysql-4.048/lib/DBD/
DBD-mysql-4.048/lib/DBD/mysql.pm
DBD-mysql-4.048/lib/DBD/mysql/
DBD-mysql-4.048/lib/DBD/mysql/INSTALL.pod
DBD-mysql-4.048/lib/DBD/mysql/GetInfo.pm
DBD-mysql-4.048/README.md
DBD-mysql-4.048/Makefile.PL
DBD-mysql-4.048/LICENSE
DBD-mysql-4.048/META.json
DBD-mysql-4.048/socket.c
DBD-mysql-4.048/dbdimp.h
DBD-mysql-4.048/META.yml
DBD-mysql-4.048/t/
DBD-mysql-4.048/t/87async.t
DBD-mysql-4.048/t/41bindparam.t
DBD-mysql-4.048/t/rt50304-column_info_parentheses.t
DBD-mysql-4.048/t/40bit.t
DBD-mysql-4.048/t/16dbi-get_info.t
DBD-mysql-4.048/t/99_bug_server_prepare_blob_null.t
DBD-mysql-4.048/t/41blobs_prepare.t
DBD-mysql-4.048/t/56connattr.t
DBD-mysql-4.048/t/65segfault.t
DBD-mysql-4.048/t/92ssl_riddle_vulnerability.t
DBD-mysql-4.048/t/40bindparam.t
DBD-mysql-4.048/t/35prepare.t
DBD-mysql-4.048/t/70takeimp.t
DBD-mysql-4.048/t/rt75353-innodb-lock-timeout.t
DBD-mysql-4.048/t/rt61849-bind-param-buffer-overflow.t
DBD-mysql-4.048/t/version.t
DBD-mysql-4.048/t/76multi_statement.t
DBD-mysql-4.048/t/40server_prepare_crash.t
DBD-mysql-4.048/t/40bindparam2.t
DBD-mysql-4.048/t/mysql.dbtest
DBD-mysql-4.048/t/53comment.t
DBD-mysql-4.048/t/29warnings.t
DBD-mysql-4.048/t/92ssl_optional.t
DBD-mysql-4.048/t/35limit.t
DBD-mysql-4.048/t/65types.t
DBD-mysql-4.048/t/40types.t
DBD-mysql-4.048/t/rt25389-bin-case.t
DBD-mysql-4.048/t/rt83494-quotes-comments.t
DBD-mysql-4.048/t/30insertfetch.t
DBD-mysql-4.048/t/05dbcreate.t
DBD-mysql-4.048/t/40blobs.t
DBD-mysql-4.048/t/40nulls_prepare.t
DBD-mysql-4.048/t/00base.t
DBD-mysql-4.048/t/80procs.t
DBD-mysql-4.048/t/55utf8mb4.t
DBD-mysql-4.048/t/rt118977-zerofill.t
DBD-mysql-4.048/t/89async-method-check.t
DBD-mysql-4.048/t/lib.pl
DBD-mysql-4.048/t/40nulls.t
DBD-mysql-4.048/t/rt91715.t
DBD-mysql-4.048/t/88async-multi-stmts.t
DBD-mysql-4.048/t/rt110983-valid-mysqlfd.t
DBD-mysql-4.048/t/86_bug_36972.t
DBD-mysql-4.048/t/42bindparam.t
DBD-mysql-4.048/t/32insert_error.t
DBD-mysql-4.048/t/40keyinfo.t
DBD-mysql-4.048/t/51bind_type_guessing.t
DBD-mysql-4.048/t/43count_params.t
DBD-mysql-4.048/t/50chopblanks.t
DBD-mysql-4.048/t/55utf8.t
DBD-mysql-4.048/t/40server_prepare_error.t
DBD-mysql-4.048/t/40server_prepare.t
DBD-mysql-4.048/t/40listfields.t
DBD-mysql-4.048/t/91errcheck.t
DBD-mysql-4.048/t/25lockunlock.t
DBD-mysql-4.048/t/15reconnect.t
DBD-mysql-4.048/t/52comment.t
DBD-mysql-4.048/t/75supported_sql.t
DBD-mysql-4.048/t/rt88006-bit-prepare.t
DBD-mysql-4.048/t/10connect.t
DBD-mysql-4.048/t/92ssl_backronym_vulnerability.t
DBD-mysql-4.048/t/manifest.t
DBD-mysql-4.048/t/60leaks.t
DBD-mysql-4.048/t/71impdata.t
DBD-mysql-4.048/t/rt86153-reconnect-fail-memory.t
DBD-mysql-4.048/t/40numrows.t
DBD-mysql-4.048/t/40catalog.t
DBD-mysql-4.048/t/rt85919-fetch-lost-connection.t
DBD-mysql-4.048/t/41int_min_max.t
DBD-mysql-4.048/t/pod.t
DBD-mysql-4.048/t/81procs.t
DBD-mysql-4.048/t/85init_command.t
DBD-mysql-4.048/t/31insertid.t
DBD-mysql-4.048/t/20createdrop.t
DBD-mysql-4.048/t/50commit.t
CPAN: YAML::XS loaded ok (v0.66)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20171120)
Configuring M/MI/MICHIELB/DBD-mysql-4.048.tar.gz with Makefile.PL
'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user '' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to ''#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see DBD::mysql::INSTALL,
section "C Compiler flags" or type
perl Makefile.PL --help
Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site]
MICHIELB/DBD-mysql-4.048.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
The error message is quite descriptive:
'mysql_config' is not recognized as an internal or external command,
operable program or batch file.
Failed to determine directory of mysql.h. Use
perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see DBD::mysql::INSTALL,
section "C Compiler flags" or type
perl Makefile.PL --help
You don't have the MySQL client libraries installed, or at least the module installation could not find where you have the MySQL client libraries installed.
Both, Strawberry Perl and ActiveState Perl come with DBD::mysql included resp. ready to install. Are you sure you need to manually install them?
Alternatively, follow the instructions in the INSTALL file of the distribution. You can read it online at https://metacpan.org/pod/distribution/DBD-mysql/lib/DBD/mysql/INSTALL.pod

Strawberry Perl CPAN cannot find path specified

C:\MyPerl>cpan install Parallel::ForkManager
Loading internal logger. Log::Log4perl recommended for better logging
Reading '\c\Users\Locals\.cpan\Metadata'
Database was generated on Wed, 25 Jul 2018 22:55:14 GMT
Running install for module 'Parallel::ForkManager'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.081)
Checksum for \c\Users\Locals\.cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkManager-1.20.tar.gz ok
The system cannot find the path specified.
Uncompressed \c\Users\Locals\.cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkManager-1.20.tar.gz successfully
Using Tar:/usr/bin/tar xf "Parallel-ForkManager-1.20.tar":
The system cannot find the path specified.
Couldn't untar Parallel-ForkManager-1.20.tar: child exited with value 1
CPAN: YAML loaded ok (v1.26)
YANICK/Parallel-ForkManager-1.20.tar.gz
Had problems unarchiving. Please build manually
What am I doing wrong? I have uninstalled and reinstalled Strawberry Perl multiple times, used the MSI installer, and now im trying to zip file. Why the hell is it creating a folder on my C drive called "C"? "C:\c\Users\Locals.cpan\"
I'm sad to be coming with an answer so late, but I ran into the exact same problem and, after some tinkering, have figured it out.
Notice something familiar about that path syntax? It's the one used by MSYS/MinGW/Git Bash. What happened is that, on MinGW, I replaced my home folder with a symlink to my Windows home folder in /c/Users/<username>/.cpan. Hence, when I launched CPAN in MinGW, it created my configuration in /c/Users/<username>/.cpan, and filled it with with paths in this format.
Now, from Strawberry Perl's point of view, this means I have an existing CPAN configuration in C:\Users\<username>\.cpan. Although this is not where CPAN for Strawberry Perl writes its configuration (at least not by default), if a CPAN configuration exists in this path, it will read and write to it instead of the default location. Of course, none of the paths in this configuration makes sense in a Windows context.
Therefore:
If you use MinGW, Git Bash, Cygwin or any other UNIX-like environment for
Windows and configured it to use your Windows home folder as your UNIX home folder, undo this configuration.
Rename, move, or if you're sure you don't need it anymore, delete
C:\Users\<username>\.cpan. You can probably move this directory from your Windows home folder to your UNIX home folder to as to preserve the configuration and modules in your UNIX-like environment. I would advise testing it out.
Run CPAN in Strawberry Perl again. It will auto-configure itself properly.
Here is sample output with the latest version of Strawberry Perl x64 which appears to have been successful:
C:\Strawberry\perl\bin>cpan install Parallel::ForkManager
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.211)
CPAN: LWP::UserAgent loaded ok (v6.34)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.70)
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 ...
Done!
Running install for module 'Parallel::ForkManager'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/Y/YA/YANICK/Parallel-ForkManager-2.
tar.gz
CPAN: Digest::SHA loaded ok (v6.02)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/Y/YA/YANICK/CHECKSUMS
CPAN: Compress::Zlib loaded ok (v2.081)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\Y\YA\YANICK\Parallel-ForkMan
r-2.02.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.30)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20180622)
Configuring Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Parallel::ForkManager
Writing MYMETA.yml and MYMETA.json
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for Y/YA/YANICK/Parallel-ForkManager-2.02.tar.gz
cp lib/Parallel/ForkManager/Child.pm blib\lib\Parallel\ForkManager\Child.pm
cp lib/Parallel/ForkManager.pm blib\lib\Parallel\ForkManager.pm
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness"
e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')"
*.t
t/00-compile.t ............ ok
t/00-load.t ............... 1/4 # time: 1 seconds
t/00-load.t ............... 2/4 # time: 21 seconds
# time: 0 seconds
# time: 2 seconds
t/00-load.t ............... ok
t/00-report-prereqs.t ..... #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Build Requires ===
#
# Module Want Have
# ------------------- ---- ----
# ExtUtils::MakeMaker any 7.34
#
# === Test Requires ===
#
# Module Want Have
# ------------------- ---- --------
# ExtUtils::MakeMaker any 7.34
# File::Spec any 3.74
# IO::Handle any 1.39
# IPC::Open3 any 1.20
# Test::More 0.94 1.302136
# Test::Warn any 0.35
#
# === Test Recommends ===
#
# Module Want Have
# ---------- -------- --------
# CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
# Module Want Have
# ---------- ---- --------
# Carp any 1.50
# File::Path any 2.15
# File::Spec any 3.74
# File::Temp any 0.2304
# Moo any 2.003004
# Moo::Role any 2.003004
# POSIX any 1.84
# Storable any 3.11
# strict any 1.11
# warnings any 1.42
#
t/00-report-prereqs.t ..... ok
t/01-utf8-all.t ........... skipped: This is a bug in perl itself on Windows
t/02-callback.t ........... # This test can take 10-20 seconds, please wait.
rted at Wed Oct 17 12:28:28 2018
t/02-callback.t ........... ok
t/03-callback-data.t ...... # This test can take 2-6 seconds, please wait. St
ed at Wed Oct 17 12:28:45 2018
t/03-callback-data.t ...... ok
t/basic-methods.t ......... ok
t/changing-pids.t ......... ok
t/start_child.t ........... ok
t/waitpid-conflict.t ...... # code outside of P::FM stole -3648
child process '-3648' disappeared. A call to `waitpid` outside of Parallel::F
Manager might have reaped it.
t/waitpid-conflict.t ...... ok
t/waitpid-waitonechild.t .. # code outside of P::FM stole -5312
t/waitpid-waitonechild.t .. ok
t/waitpid_blocking.t ...... ok
All tests successful.
Test Summary Report
-------------------
t/waitpid-conflict.t (Wstat: 0 Tests: 2 Failed: 0)
TODO passed: 1-2
t/waitpid-waitonechild.t (Wstat: 0 Tests: 3 Failed: 0)
TODO passed: 2-3
Files=12, Tests=28, 70 wallclock secs ( 0.09 usr + 0.00 sys = 0.09 CPU)
Result: PASS
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- OK
Running make install
Installing C:\STRAWB~1\perl\site\lib\Parallel\ForkManager.pm
Installing C:\STRAWB~1\perl\site\lib\Parallel\ForkManager\Child.pm
Appending installation info to C:\STRAWB~1\perl\lib/perllocal.pod
YANICK/Parallel-ForkManager-2.02.tar.gz
C:\STRAWB~1\c\bin\gmake.exe install UNINST=1 -- OK
I think the problem may be you're just not running cpan from your \perl\bin directory.
I installed via the .msi installer to a custom location, but for some reason the path didn't get reconfigured internally. Cpan continued downloading to C:\straberry, even if there was no Perl installation there.
Luckily, this is what the relocation.pl.bat is for. Downloading the .zip distribution, extracting the batch-file to my Perl installation and running it solved the Problem.
Read the README file that comes with the Perl installation for more information.

Installing XML::DOM module fails

I couldn't find any solution for two weeks.!!!!
I try to install CPAN Modules using the cpan.exe.
When I try to install a module with "install XML::DOM" fails stating dmake.exe is NOT OK,
here is my error:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\ehsan\Documents>cpan
Set up gcc environment - gcc.exe (release with patches / build 20130526 by st
berryperl.com) 4.7.3
There seems to be running another CPAN process (pid 5932). Contacting...
Other job not responding. Shall I overwrite the lockfile 'C:\Perl\cpan\.lock'
Y/n) [y] y
cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.
cpan> install XML::DOM
Reading 'C:\Perl\cpan\Metadata'
Database was generated on Thu, 24 Oct 2013 11:09:28 GMT
Running install for module 'XML::DOM'
Running make for T/TJ/TJMATHER/XML-DOM-1.44.tar.gz
Checksum for C:\Perl\cpan\sources\authors\id\T\TJ\TJMATHER\XML-DOM-1.44.tar.g
k
Scanning cache C:\Perl/cpan/build for sizes
............................................................................D
XML-DOM-1.44/
XML-DOM-1.44/lib/
XML-DOM-1.44/lib/XML/
XML-DOM-1.44/lib/XML/DOM/
XML-DOM-1.44/lib/XML/DOM/DocumentType.pod
XML-DOM-1.44/lib/XML/DOM/DocumentFragment.pod
XML-DOM-1.44/lib/XML/DOM/AttlistDecl.pod
XML-DOM-1.44/lib/XML/DOM/Notation.pod
XML-DOM-1.44/lib/XML/DOM/Attr.pod
XML-DOM-1.44/lib/XML/DOM/ProcessingInstruction.pod
XML-DOM-1.44/lib/XML/DOM/Entity.pod
XML-DOM-1.44/lib/XML/DOM/Document.pod
XML-DOM-1.44/lib/XML/DOM/Parser.pod
XML-DOM-1.44/lib/XML/DOM/NodeList.pm
XML-DOM-1.44/lib/XML/DOM/Node.pod
XML-DOM-1.44/lib/XML/DOM/ElementDecl.pod
XML-DOM-1.44/lib/XML/DOM/EntityReference.pod
XML-DOM-1.44/lib/XML/DOM/NodeList.pod
XML-DOM-1.44/lib/XML/DOM/CharacterData.pod
XML-DOM-1.44/lib/XML/DOM/DOMException.pm
XML-DOM-1.44/lib/XML/DOM/PerlSAX.pm
XML-DOM-1.44/lib/XML/DOM/NamedNodeMap.pm
XML-DOM-1.44/lib/XML/DOM/NamedNodeMap.pod
XML-DOM-1.44/lib/XML/DOM/Comment.pod
XML-DOM-1.44/lib/XML/DOM/Element.pod
XML-DOM-1.44/lib/XML/DOM/XMLDecl.pod
XML-DOM-1.44/lib/XML/DOM/CDATASection.pod
XML-DOM-1.44/lib/XML/DOM/DOMImplementation.pod
XML-DOM-1.44/lib/XML/DOM/Text.pod
XML-DOM-1.44/lib/XML/DOM/AttDef.pod
XML-DOM-1.44/lib/XML/DOM.pm
XML-DOM-1.44/lib/XML/Handler/
XML-DOM-1.44/lib/XML/Handler/BuildDOM.pm
XML-DOM-1.44/t/
XML-DOM-1.44/t/dom_jp_minus.t
XML-DOM-1.44/t/dom_noexpand.t
XML-DOM-1.44/t/dom_template.t
XML-DOM-1.44/t/dom_jp_cdata.t
XML-DOM-1.44/t/dom_jp_modify.t
XML-DOM-1.44/t/dom_text.t
XML-DOM-1.44/t/dom_cdata.t
XML-DOM-1.44/t/dom_jp_attr.t
XML-DOM-1.44/t/dom_extent.t
XML-DOM-1.44/t/dom_minus.t
XML-DOM-1.44/t/dom_attr.t
XML-DOM-1.44/t/dom_encode.t
XML-DOM-1.44/t/dom_jp_example.t
XML-DOM-1.44/t/dom_extent.ent
XML-DOM-1.44/t/dom_jp_print.t
XML-DOM-1.44/t/dom_documenttype.t
XML-DOM-1.44/t/dom_extent.dtd
XML-DOM-1.44/t/dom_jp_astress.t
XML-DOM-1.44/t/build_dom.t
XML-DOM-1.44/t/dom_print.t
XML-DOM-1.44/t/dom_astress.t
XML-DOM-1.44/t/dom_modify.t
XML-DOM-1.44/t/dom_example.t
XML-DOM-1.44/FAQ.xml
XML-DOM-1.44/Changes
XML-DOM-1.44/MANIFEST
XML-DOM-1.44/META.yml
XML-DOM-1.44/CmpDOM.pm
XML-DOM-1.44/samples/
XML-DOM-1.44/samples/minutes.xml
XML-DOM-1.44/samples/REC-xml-19980210.xml
XML-DOM-1.44/BUGS
XML-DOM-1.44/CheckAncestors.pm
XML-DOM-1.44/XML-Parser-2.31.patch
XML-DOM-1.44/Makefile.PL
XML-DOM-1.44/README
CPAN.pm: Building T/TJ/TJMATHER/XML-DOM-1.44.tar.gz
Set up gcc environment - gcc.exe (release with patches / build 20130526 by st
berryperl.com) 4.7.3
Checking if your kit is complete...
Looks good
Warning: prerequisite XML::Parser::PerlSAX 0.07 not found.
Warning: prerequisite XML::RegExp 0 not found.
Writing Makefile for XML-DOM
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
---- TJMATHER/XML-DOM-1.44.tar.gz ----
XML::Parser::PerlSAX [requires]
XML::RegExp [requires]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'XML::Parser::PerlSAX'
Running make for K/KM/KMACLEOD/libxml-perl-0.08.tar.gz
Checksum for C:\Perl\cpan\sources\authors\id\K\KM\KMACLEOD\libxml-perl-0.08.t
gz ok
libxml-perl-0.08/
libxml-perl-0.08/lib/
libxml-perl-0.08/lib/XML/
libxml-perl-0.08/lib/XML/Handler/
libxml-perl-0.08/lib/XML/Handler/Subs.pm
libxml-perl-0.08/lib/XML/Handler/CanonXMLWriter.pm
libxml-perl-0.08/lib/XML/Handler/Sample.pm
libxml-perl-0.08/lib/XML/Handler/XMLWriter.pm
libxml-perl-0.08/lib/XML/PatAct/
libxml-perl-0.08/lib/XML/PatAct/ActionTempl.pm
libxml-perl-0.08/lib/XML/PatAct/PatternTempl.pm
libxml-perl-0.08/lib/XML/PatAct/Amsterdam.pm
libxml-perl-0.08/lib/XML/PatAct/MatchName.pm
libxml-perl-0.08/lib/XML/PatAct/ToObjects.pm
libxml-perl-0.08/lib/XML/SAX2Perl.pm
libxml-perl-0.08/lib/XML/Perl2SAX.pm
libxml-perl-0.08/lib/XML/ESISParser.pm
libxml-perl-0.08/lib/XML/Parser/
libxml-perl-0.08/lib/XML/Parser/PerlSAX.pm
libxml-perl-0.08/lib/Data/
libxml-perl-0.08/lib/Data/Grove/
libxml-perl-0.08/lib/Data/Grove/Parent.pm
libxml-perl-0.08/lib/Data/Grove/Visitor.pm
libxml-perl-0.08/lib/Data/Grove.pm
libxml-perl-0.08/doc/
libxml-perl-0.08/doc/CreatingPatActModules.pod
libxml-perl-0.08/doc/interface-style.pod
libxml-perl-0.08/doc/modules.xml
libxml-perl-0.08/doc/sax-2.0-adv.html
libxml-perl-0.08/doc/UsingPatActModules.pod
libxml-perl-0.08/doc/PerlSAX.pod
libxml-perl-0.08/doc/mirror.sh
libxml-perl-0.08/doc/sax-2.0.html
libxml-perl-0.08/doc/UsingPerlSAX.pod
libxml-perl-0.08/doc/index.html
libxml-perl-0.08/Changes
libxml-perl-0.08/MANIFEST
libxml-perl-0.08/examples/
libxml-perl-0.08/examples/schema.xml
libxml-perl-0.08/examples/MyHandler.pm
libxml-perl-0.08/examples/myhandler.xml
libxml-perl-0.08/examples/myhandler.pl
libxml-perl-0.08/examples/schema.pl
libxml-perl-0.08/examples/perlsax-test.pl
libxml-perl-0.08/examples/esis-test.pl
libxml-perl-0.08/t/
libxml-perl-0.08/t/schema.t
libxml-perl-0.08/t/stream.t
libxml-perl-0.08/t/xp_sax.t
libxml-perl-0.08/t/subs.t
libxml-perl-0.08/t/canon_xml_writer.t
libxml-perl-0.08/t/amsterdam.t
libxml-perl-0.08/ChangeLog
libxml-perl-0.08/libxml-perl.spec
libxml-perl-0.08/libxml-perl-0.08.spec
libxml-perl-0.08/Makefile.PL
libxml-perl-0.08/README
CPAN.pm: Building K/KM/KMACLEOD/libxml-perl-0.08.tar.gz
Set up gcc environment - gcc.exe (release with patches / build 20130526 by st
berryperl.com) 4.7.3
Checking if your kit is complete...
Looks good
Writing Makefile for libxml-perl
Writing MYMETA.yml and MYMETA.json
CreateProcess failed (2).
dmake.exe: Error executing 'C:\PROGRA~1\RATIONAL\RATION~1\NUTCROOT\mksnt\sh.
-c C:\Perl\bin\perl.exe -MExtUtils::Command -e mkpath -- blib\lib': No such
e or directory
dmake.exe: Error code -1, while making 'blib\lib\.exists'
KMACLEOD/libxml-perl-0.08.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Running install for module 'XML::RegExp'
Running make for T/TJ/TJMATHER/XML-RegExp-0.04.tar.gz
Checksum for C:\Perl\cpan\sources\authors\id\T\TJ\TJMATHER\XML-RegExp-0.04.ta
z ok
XML-RegExp-0.04/
XML-RegExp-0.04/META.yml
XML-RegExp-0.04/test.pl
XML-RegExp-0.04/README
XML-RegExp-0.04/Changes
XML-RegExp-0.04/MANIFEST
XML-RegExp-0.04/lib/
XML-RegExp-0.04/lib/XML/
XML-RegExp-0.04/lib/XML/RegExp.pm
XML-RegExp-0.04/Makefile.PL
CPAN.pm: Building T/TJ/TJMATHER/XML-RegExp-0.04.tar.gz
Set up gcc environment - gcc.exe (release with patches / build 20130526 by st
berryperl.com) 4.7.3
Checking if your kit is complete...
Looks good
Writing Makefile for XML::RegExp
Writing MYMETA.yml and MYMETA.json
CreateProcess failed (2).
dmake.exe: Error executing 'C:\PROGRA~1\RATIONAL\RATION~1\NUTCROOT\mksnt\sh.
-c C:\Perl\bin\perl.exe -MExtUtils::Command -e mkpath -- blib\lib\XML': No s
file or directory
dmake.exe: Error code -1, while making 'blib\lib\XML\.exists'
TJMATHER/XML-RegExp-0.04.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Running make for T/TJ/TJMATHER/XML-DOM-1.44.tar.gz
Has already been unwrapped into directory C:\Perl\cpan\build\XML-DOM-1.44-P
El
CPAN.pm: Building T/TJ/TJMATHER/XML-DOM-1.44.tar.gz
Warning: Prerequisite 'XML::Parser::PerlSAX => 0.07' for 'TJMATHER/XML-DOM-1.
tar.gz' failed when processing 'KMACLEOD/libxml-perl-0.08.tar.gz' with 'make
NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'XML::RegExp => 0' for 'TJMATHER/XML-DOM-1.44.tar.gz' f
ed when processing 'TJMATHER/XML-RegExp-0.04.tar.gz' with 'make => NO'. Conti
ng, but chances to succeed are limited.
CreateProcess failed (2).
dmake.exe: Error executing 'C:\PROGRA~1\RATIONAL\RATION~1\NUTCROOT\mksnt\sh.
-c C:\Perl\bin\perl.exe -MExtUtils::Command -e mkpath -- blib\lib': No such
e or directory
dmake.exe: Error code -1, while making 'blib\lib\.exists'
TJMATHER/XML-DOM-1.44.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
KMACLEOD/libxml-perl-0.08.tar.gz : make NO
TJMATHER/XML-DOM-1.44.tar.gz : make NO
TJMATHER/XML-RegExp-0.04.tar.gz : make NO
i asked this question in Perlmonks and i got this answer :
"Looks like you are (or have been) using MKS, which can confuse things such as which shell dmake invokes and so on. I suggest you remove it (the path to MKS) from your system PATH variable (example). Once you've done this start a new command prompt and retry the installation"
what should i do?
I see a problem here:
dmake.exe: Error executing 'C:\PROGRA~1\RATIONAL\RATION~1\NUTCROOT\mksnt\sh.
-c C:\Perl\bin\perl.exe -MExtUtils::Command -e mkpath -- blib\lib': No such
e or directory
dmake.exe: Error code -1, while making 'blib\lib\.exists'
TJMATHER/XML-DOM-1.44.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
Your dmake call comes from a Strawberry Perl installation, and it invokes what looks like ActivePerl. Down that PATH lies madness. If you want to use CPAN with Strawberry Perl, then remove the ActivePerl directories from your PATH.
Specifically, try this:
set PATH C:\STRAWB~1\perl\bin;C:\STRAWB~1\c\bin
cpan XML::DOM
Your key is probably here:
Warning: Prerequisite 'XML::Parser::PerlSAX => 0.07' for 'TJMATHER/XML-DOM-1.
tar.gz' failed when processing 'KMACLEOD/libxml-perl-0.08.tar.gz' with 'make
NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'XML::RegExp => 0' for 'TJMATHER/XML-DOM-1.44.tar.gz' f
ed when processing 'TJMATHER/XML-RegExp-0.04.tar.gz' with 'make => NO'. Conti
ng, but chances to succeed are limited.
You need to have XML::Parser::PerlSAX and XML::RegExp installed first.

CPAN Perl modules installer not finding tar file

It seems I have a configuration problem when installing Perl modules through CPAN and I don't know how to correct it:
[root#ip JESSE]# pwd
/root/.cpan/sources/authors/id/J/JE/JESSE
[root#ip JESSE]# ls -l
total 240
-rw-r--r-- 1 root root 105464 Feb 20 11:39 CHECKSUMS
-rw-r--r-- 1 root root 9223 Apr 12 2011 Locale-Maketext-Simple-0.21.tar.gz
-rw-r--r-- 1 root root 125483 Feb 20 11:39 WWW-Mechanize-1.72.tar.gz
[root#ip JESSE]# cpan -i WWW::Mechanize
CPAN: Storable loaded ok (v2.20)
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 20 Feb 2012 11:10:26 GMT
Running install for module 'WWW::Mechanize'
Running make for J/JE/JESSE/WWW-Mechanize-1.72.tar.gz
CPAN: Digest::SHA loaded ok (v5.61)
CPAN: Compress::Zlib loaded ok (v2.033)
Checksum for /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.82)
Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully
Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar":
Couldn't untar WWW-Mechanize-1.72.tar
CPAN: File::Temp loaded ok (v0.22)
CPAN: CPAN::Meta loaded ok (v2.112150)
Package seems to come without Makefile.PL.
(The test -f "/root/.cpan/build/JESSE-n72IRU/Makefile.PL" returned false.)
Writing one on our own (setting NAME to WWWMechanize)
Had problems unarchiving. Please build manually
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
[root#ip JESSE]# ls -l
total 240
-rw-r--r-- 1 root root 105464 Feb 20 11:39 CHECKSUMS
-rw-r--r-- 1 root root 9223 Apr 12 2011 Locale-Maketext-Simple-0.21.tar.gz
-rw-r--r-- 1 root root 125483 Feb 20 11:39 WWW-Mechanize-1.72.tar.gz
[root#ip JESSE]# which tar
/bin/tar
[root#ip JESSE]# which gzip
/bin/gzip
The problem seems to be here:
Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully
Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar":
Couldn't untar WWW-Mechanize-1.72.tar
The tar.gz file is indeed uncompressed and can be found here in a new directory:
/root/.cpan/build/JESSE-KjCEMS/WWW-Mechanize-1.72.tar
If I run the same command from inside the shell, I get some more info:
cpan[1]> install WWW::Mechanize
CPAN: Storable loaded ok (v2.20)
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 20 Feb 2012 11:10:26 GMT
Running install for module 'WWW::Mechanize'
Running make for J/JE/JESSE/WWW-Mechanize-1.72.tar.gz
CPAN: Digest::SHA loaded ok (v5.61)
CPAN: Compress::Zlib loaded ok (v2.033)
Checksum for /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Use of uninitialized value $newdir in substitution (s///) at /usr/lib64/perl5/Cwd.pm line 502.
Use of uninitialized value $newdir in chdir at /usr/lib64/perl5/Cwd.pm line 510.
Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/lib64/perl5/Cwd.pm line 510.
Use of uninitialized value $newdir in pattern match (m//) at /usr/lib64/perl5/Cwd.pm line 525.
Use of uninitialized value $newdir in split at /usr/lib64/perl5/Cwd.pm line 531.
..........................................................................--DONE
DEL(1/10): /root/.cpan/build/CPAN-1.9600-jGTV10
DEL(2/10): /root/.cpan/build/File-Which-1.09-yoVWZC
DEL(3/10): /root/.cpan/build/Test-Script-1.07-aJWrXb
DEL(4/10): /root/.cpan/build/Probe-Perl-0.01-gzZ2eR
DEL(5/10): /root/.cpan/build/IPC-Run3-0.044-AP6EMp
DEL(6/10): /root/.cpan/build/Time-HiRes-1.9721-xxseE6
DEL(7/10): /root/.cpan/build/CPAN-Meta-YAML-0.003-wGtH0a
DEL(8/10): /root/.cpan/build/JSON-PP-2.27105-fvkwNa
DEL(9/10): /root/.cpan/build/Package-Constants-0.02-7Ms_OL
DEL(10/10): /root/.cpan/build/Module-Metadata-1.000004-tXKIBB
CPAN: Archive::Tar loaded ok (v1.82)
Uncompressed /root/.cpan/sources/authors/id/J/JE/JESSE/WWW-Mechanize-1.72.tar.gz successfully
Using Tar:/bin/tar xvf "WWW-Mechanize-1.72.tar":
Couldn't untar WWW-Mechanize-1.72.tar
CPAN: File::Temp loaded ok (v0.22)
CPAN: CPAN::Meta loaded ok (v2.112150)
Package seems to come without Makefile.PL.
(The test -f "/root/.cpan/build/JESSE-DGrTh_/Makefile.PL" returned false.)
Writing one on our own (setting NAME to WWWMechanize)
Had problems unarchiving. Please build manually
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Failed during this command:
JESSE/WWW-Mechanize-1.72.tar.gz : unwrapped NO -- untar failed
It seems to me that $newdir is not being updated with the dynamically generated /root/.cpan/build/JESSE-DGrTh_/ or /root/.cpan/build/JESSE-KjCEMS/ or whatever the system generates or at least that information is not getting to the tar command
Does anyone know how I can fix the mechanism without having to resort to a manual install ?
Edit:
I ran into this problem again. All I needed to do was free some memory like Keith Broughton suggested.
I ran into the same problem and tried to find the root cause for this problem. I'm listing my findings here so other Googlers don't have to spend a couple of hours before giving up...
What solved it for me was simply rebooting the system.
Things I tried:
Upgrading CPAN. This would also fail with the "Couldn't untar" error message. I doesn't matter if you try it using the cpan shell, "cpan -i CPAN" or "perl -MCPAN -e 'install CPAN'". I didn't think any of these would solve the problem, but when you start googling all these are suggested as possible solutions.
Replacing tar with a script that logs its input to check if one of the parameters or cwd is incorrect when it is called. The script is never called it seems. The "Couldn't untar" message is still the same, even after temporarily renaming /bin/tar.
Checking CPAN/Tarzip.pm and adding print lines near the code that writes the "Couldn't untar" message. It seems that the system() call fails and tar (or ls in my debug code) is never called.
Then I decided to reboot, which was an option because this is not a live system. After that the problem was gone and Perl modules installed on first try.
Other observations:
The system seems to work just fine for the rest. You can still connect to the system, you can edit files, modifications are still there after the reboot. I would expect any of these to fail long before a Perl system() call starts to fail.
A quick scan through the logfiles doesn't show any red flags.
Sometimes this can happen simply due to a lack of available memory. Try turning off some services that are running and try again.
Worked for me :-)
To resolve the following error:
Couldn't untar WWW-Mechanize-1.72.tar
Try install Archive::Tar
On centos 6.X:
yum install perl-Archive-Tar.x86_64
Found the same issue on DigitalOcean droplet with 512MB RAM running Ubuntu (with about 200MB free).
I was able to solve it by rebooting the machine, I tried updating my CPAN using 'install Bundle::CPAN'. It worked for the first few modules, and then the 'Couldn't untar' message appeared again.
Rebooting allowed me to progress in the installation. These repeated reboots are of course a less than optimal solution.
Given that the system has free memory, and the issue re-appears after using the machine for a little while, it seems to be this could be related to an issue with shared libraries.
Shot in the blue: partition is full. Delete some files.