(Windows 10) Trying to Install Perl Modules both PPM and CPAN fail? - perl

Currently running strawberry perl (latest release fresh install) on windows 10
This is what I get when I try running PPM
PS C:\> ppm
Attempt to reload Compress/Raw/Zlib.pm aborted.
Compilation failed in require at C:/Strawberry/perl/vendor/lib/Archive/Zip.pm line 9.
BEGIN failed--compilation aborted at C:/Strawberry/perl/vendor/lib/Archive/Zip.pm line 9.
Compilation failed in require at C:/Strawberry/perl/vendor/lib/PPM.pm line 30.
BEGIN failed--compilation aborted at C:/Strawberry/perl/vendor/lib/PPM.pm line 30.
Compilation failed in require at C:\Strawberry\perl\bin\ppm.bat line 22.
BEGIN failed--compilation aborted at C:\Strawberry\perl\bin\ppm.bat line 22.
This is what I get when I try running cpan
PS C:\> cpan install PadWalker
CPAN: CPAN::SQLite loaded ok (v0.219)
Database was generated on Wed, 25 Nov 2020 19:37:48 GMT
Running install for module 'PadWalker'
CPAN: checksum security checks disabled because Digest::SHA not installed.
Please consider installing the Digest::SHA module.
'" "' is not recognized as an internal or external command,
operable program or batch file.
CPAN: Archive::Tar loaded ok (v1.60)
CPAN.pm needs either the external programs tar and gzip -or- both
modules Archive::Tar and Compress::Zlib installed.
For tar I found nothing, for gzip nothing.
For Archive::Tar I found '', for Compress::Zlib nothing;
Can't continue cutting file 'C:\STRAWB~1\cpan\sources\authors\id\R\RO\ROBIN\PadWalker-2.5.tar.gz'.
CPAN: YAML::XS loaded ok (v0.82)
ROBIN/PadWalker-2.5.tar.gz
Had problems unarchiving. Please build manually
Stopping: 'install' failed for 'PadWalker'.
my perl -v in case thats useful to anyone
PS C:\> perl -v
This is perl 5, version 32, subversion 0 (v5.32.0) built for MSWin32-x64-multi-thread
Anyone have any experience with this at all? I tried looking up some related issues on the errors I was getting but didn't find anything really useful.
Thanks!

#Clamp provided the correct solution by just completely deleting the Strawberry directory and doing a fresh install. Seemed as though there were two different versions conflicting.
I'd suggest deleting C:\Strawberry and install to a clean directory. – clamp Nov 25 '20 at 23:01
(Windows 10) Trying to Install Perl Modules both PPM and CPAN fail?

Related

Trouble installing Tk module for perl using CPAN

I am trying to install the Tk module in Strawberry Perl using cpan install Tk, but I get the following error message.
Loading internal logger. Log::Log4perl recommended for better logging
Reading '\c\Users\Pravi\.cpan\Metadata'
Database was generated on Mon, 18 May 2020 17:55:59 GMT
Running install for module 'Tk'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.09)
Checksum for \c\Users\Pravi\.cpan\sources\authors\id\S\SR\SREZIC\Tk-804.035.tar.gz ok
The system cannot find the path specified.
Uncompressed \c\Users\Pravi\.cpan\sources\authors\id\S\SR\SREZIC\Tk-804.035.tar.gz successfully
Using Tar:/usr/bin/tar xf "Tk-804.035.tar":
The system cannot find the path specified.
Couldn't untar Tk-804.035.tar: child exited with value 1
CPAN: YAML loaded ok (v1.29)
SREZIC/Tk-804.035.tar.gz
Had problems unarchiving. Please build manually
I am confused by the "System cannot find the path specified" and am wondering how I can fix this issue.
Tk installation with CPAN
I have tried following the steps here but it looks like this for ActivePerl and NOT Strawberry Perl.

INSTALL_BASE=~/perl5 -- NOT OK - While installing Perl Module

I am trying to install one of the Perl module in my local system (Windows 7). But its failing to install the module
Here is what its displaying
C:\Windows\system32>perl -MCPAN -e "install Net::SFTP"
Reading 'C:\Users\AppData\Local\.cpan\Metadata'
Database was generated on Sun, 26 May 2019 05:17:03 GMT
Running install for module 'Net::SFTP'
Checksum for C:\Users\AppData\Local\.cpan\sources\authors\id\L\LK\LKINLE
Y\Net-SFTP-0.12.tar.gz ok
Configuring L/LK/LKINLEY/Net-SFTP-0.12.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Math::Int64 0.54 not found.
Warning: prerequisite Net::SSH::Perl 2.12 not found.
The getpwuid function is unimplemented at C:/Perl64/lib/ExtUtils/MakeMaker.pm li
ne 1064.
Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL INSTALL_BASE=~
/perl5]
LKINLEY/Net-SFTP-0.12.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALL_BASE=~/perl5 -- NOT OK
It was working fine before and I have installed couple of modules, don't know what happens suddenly.
Please help me to resolve this. Do I need to make any modifications in config?
You're telling Perl to into ~/perl5. That's not a Windows path, and ExtUtils::MakeMaker is using a unix-specific function (getpwuid) to expand it. Your problem should go away if you use a Windows path.
That said, if you have access to write to C:\Perl64\..., I suggest that you install modules to the default directory by removing INSTALL_BASE=~/perl5.
If you don't have access to write to C:\Perl64\..., I suggest that you install Perl itself in a directly to which you do have access to write, and then I'd install modules to the default directory by removing INSTALL_BASE=~/perl5.
Since you didn't actually specify INSTALL_BASE=~/perl5 on the command line, you are specifying it through the environment (PERL_MM_OPT and PERL_MB_OPT), or in cpan's configuration (o conf from within cpan).

NET::SSH::Expect configurations to work over windows

Machine details : Windows7 , 64-bits.
I integrated perl in eclipse and used Net::SSH::Except module for scripting, but am getting an error as Can't locate Net/SSH/Expect.pm in #INC (you may need to install the Net::SSH::Expect
module) (#INC contains: C:/Perl64/site/lib/MSWin32-x64-multi-thread C:/Perl64/site/lib
C:/Perl64/lib .)
Therefore, Am trying to install IO::Tty for Expect dependency, using command cpan>notest install IO::Tty.
i am getting the following error message :
and the module is not being installed, even the NET::SSH::Expect not getting installed.
cpan> notest install IO::Tty
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Mon, 11 Dec 2017 04:41:02 GMT
Fetching with LWP:
http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz
Reading 'C:\Perl64\cpan\sources\authors\01mailrc.txt.gz'
.............................................................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 Tue, 12 Dec 2017 04:29:02 GMT
.............
**New CPAN.pm version (v2.16) available.
[Currently running version is v2.1101]
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 'IO::Tty'
Checksum for C:\Perl64\cpan\sources\authors\id\T\TO\TODDR\IO-Tty-1.12.tar.gz
ok
Scanning cache C:\Perl64/cpan/build for sizes
...............................................................DONE
IO-Tty-1.12/
IO-Tty-1.12/ChangeLog
IO-Tty-1.12/Makefile.PL
IO-Tty-1.12/MANIFEST
IO-Tty-1.12/META.json
IO-Tty-1.12/META.yml
IO-Tty-1.12/Pty.pm
IO-Tty-1.12/README
IO-Tty-1.12/t/
IO-Tty-1.12/try
IO-Tty-1.12/Tty.pm
IO-Tty-1.12/Tty.xs
IO-Tty-1.12/t/test.t
Configuring T/TO/TODDR/IO-Tty-1.12.tar.gz with Makefile.PL
This module requires a POSIX compliant system to work. Try cygwin if you
need this module on windows OS unsupported at Makefile.PL line 6.
Warning: No success on command[C:\Perl64\bin\perl.exe Makefile.PL
INSTALLDIRS=site]
TODDR/IO-Tty-1.12.tar.gz
C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
Failed during this command:
TODDR/IO-Tty-1.12.tar.gz : writemakefile NO
'C:\Perl64\bin\
perl.exe Makefile.PL INSTALLDIRS=site' returned status 65280
i have tried installed IO::Tty with following command
cpanm --install IO::Tty
cpanm --verbose IO::Tty
cpanm --force IO::Tty
all failing , this may be due to the lower version of the perl.
what is the command to upgrade cpan from cmd and also perl through cmd?
Sadly the Perl Expect module requires a UNIX based OS to function. I have implemented this a few times on a windows platform and basically you need to install an older ActiveState distribution of TCL, then you can have the Perl script call an external EXPECT script, like this:
$expectOutput = `[path_to_expect_script.expect]`;
Your variable will then contain the output of the Expect script.
Hope this helps!
Edit: You may like to reword your title to attract more answers relating to using expect on windows.
Solved!
the new version of Expect is made compatible with the windows, but it need to be installed with cygwin ..
In eclipse , make interpreter as cygwin (windows -> preference -> EPIC Perl -> interpreter).
and execute the script:)

Padre Complains that a Perl Module isn't installed when CPAN says it is

Padre IDE is complaining that:
Can't locate Email/Send/SMTP/Gmail.pm in #INC (#INC contains: C:\Users\me\mymodule C:/Dwimperl/perl/site/lib C:/Dwimperl/perl/vendor/lib C:/Dwimperl/perl/lib .) at myscript.pl line 21.
But Email::Send::SMTP::Gmail module is installed because in command prompt when I run cpan Email::Send::SMTP::Gmail I get the following message:
Loading internal null logger. Install Log::Log4perl for logging messages
CPAN: Term::ANSIColor loaded ok (v4.06)
CPAN: Storable loaded ok (v2.56_01)
Reading 'C:\Perl64\cpan\Metadata'
Database was generated on Sun, 21 May 2017 04:17:02 GMT
CPAN: Module::CoreList loaded ok (v5.20170114_24)
Email::Send::SMTP::Gmail is up to date (1.06).
What the heck is going wrong? Note in Padre when I go to Tools->Module Tools->Open CPAN Config File I get the error dialog popup:
Failed to find your CPAN configuration
Could this be part of the problem? I have searched the Padre help for cpan configuration but no results came up.
Any advice would be extremely helpful.
You appear to have two installations of Perl, one in C:\Dwimperl, and one in C:\Perl64. You are installing the module for the one in C:\Perl64, but you are using the one in C:\Dwimperl. Use the cpan that comes with the perl you wish to use.

OS X CPAN Perl module installation issue

I'm trying to install Perl module MediaWiki::API using CPAN on OS X:
sudo cpan MediaWiki::API Password:
Reading '/Users/qazwsx/.cpan/Metadata'
Database was generated on Mon, 13 Jul 2015 20:53:32 GMT
Running install for module 'MediaWiki::API'
Running make for E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz
Checksum for /Users/qazwsx/.cpan/sources/authors/id/E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz ok
sh: /opt/local/bin/gzip: No such file or directory
Package seems to come without Makefile.PL.
(The test -f "/Users/qazwsx/.cpan/build/EXOBUZZ-iwzBiH/Makefile.PL" returned false.)
Writing one on our own (setting NAME to MediaWikiAPI)
CPAN.pm: Building E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz
Writing Makefile for MediaWikiAPI
Writing MYMETA.yml and MYMETA.json
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
No tests defined for MediaWikiAPI extension.
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make test -- OK
Running make install
Appending installation info to /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level/perllocal.pod
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make install -- OK
This is a step of installing Git-Mediawiki (see https://github.com/moy/Git-Mediawiki/wiki/User-manual). However, after all the installation steps, the first git command reports that MediaWiki::API module isn't available:
git pull
Can't locate MediaWiki/API.pm in #INC (you may need to install the MediaWiki::API module) (#INC contains: /Users/qazwsx/WorkSpace-X4430/git/perl /Users/qazwsx/WorkSpace-X4430/git/contrib/mw-to-git /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.
I wonder if my installation method for the Perl module is correct. One thing strikes out as odd is the error
sh: /opt/local/bin/gzip: No such file or directory
I use Homebrew with standard paths, so the gzip binary is at /usr/local/bin/gzip. But I don't know if or where to fix it. It appears to be some search paths issue but I don't know how to fix it.
There might be something wrong with your ~/.cpan, the configuration for CPAN. You can try
# Re-install cpan
brew doctor
brew update
brew install cpan
# Remove or back up ~/.cpan
mv ~/.cpan ~/.cpan.bak
# Re-initialize ~/.cpan
cpan config
# Try installing the Perl module again
sudo cpan install MediaWiki::API