Failed to install Tk module of Perl in Windows7 - perl

At first,I tried to use ppm and cpanm to install Tk module.But failed to download whth the reason which i don't konw(yet i can install image module) .So I tried another way.I downloaded the Tk-804.030 from the cpan website.And unpacked it.Then I type "perl makefile.pl" in the cmd, howerver, shit happens.There were so many errors.And i remenbered to read the README.txt, so i found the following which make me frustrated.
When you install ActivePerl, it provides patched C runtime as PerlCRT.dll
which it installs in the "system32" directory.
This needs "administrator" rights on NT.
It also provides the import library PerlCRT.lib, but this is installed
in an odd location e.g. C:\ActivePerl\lib\CORE\PerlCRT.lib
where it is not found by MakeMaker or VC++.I copied it to C:\VisualStudio\VC98\lib\PerlCRT.lib
(Your paths may vary dependinh where you installed ActivePerl and VC++.)
I could not find the PerlCRT.dll and PerlCRT.lib in my computer, i googled and found PerlCRT.dll which could be downloaded, but i counld find PerlCRT.lib to download.i don't kown how to do it, i really need some help.It couldn't be better if you can tell me the whole installing procedure. ( I'm new to Perl, and I use Win7, visual studio 2012 and MinGW as well)

See PPM Tk info page, the distro fails to build on the current versions of ActiveState Perl for Windows. You can add the 3rd party Bribes repository, Tk is available there.

Related

Installing Net::SFTP and Net::SSH2 without CPAN

I am making a Perl script to fetch files from a Unix Server using SFTP. I want to search the file using Regex and then download it to my system folder. I am using ActivePerl and Windows 64 bit environment. I looked on various posts which suggested the best way is using Net::SFTP::Foreign::Backend::Net_SSH2 but I am facing lots of errors while installing Net::SFTP and Net::SSH2.I cannot CPAN from my system and tried with GCC and dmake. Net::SFTP is halting at Math::Pari and Net::SSH2 is asking for libraries libssh2. I downloaded libssh2 from here but not able to install it.
Also can I use any 3-d part OS tools like psftp through Perl to server my requirements.
1. Net::SSH2 is not in offical PPM repositories. Install it using below:
ppm install http://www.sisyphusion.tk/ppm/Net-SSH2.ppd
Tested on Windows 7 and Perl 5.18.4
2. For Math::Pari check this answer Unable to install Math::Pari module

Problems while installing WWW::Mechanize::Firefox

I am using the windows 8 operating system and I am trying to install the WWW::Mechanize::Firefox module in ActiveState Perl, from CPAN. I have successfully downloaded and installed all the dependencies and also installed the MozRepl module on Firefox. I do not have noScript running on my firefox and hence I am assuming that Javascript is enabled across all files (I am not sure how or where to check that). Here is my error message when I try to install the module.
I also constantly receive this error throughout the installation - "Subroutine-MozRepl-Load Plugins redefined at line 104."
Any help is much appreciated ! Thank you !
EDIT - These are the errors -
As Kim suggested in comments, you will need Mozrepl and Firefox.
Please refer WWW::Mechanize::Firefox::Installation page for detailed instructions on how to install this module.
If you use ActiveStates package manager, you can find some pre-packaged but untested PPMs at https://github.com/Corion/www-mechanize-firefox/downloads .
I needed to use this module on Windows, and couldn't get it running with ActivePerl. So I installed http://strawberryperl.com/ and it worked. This version of perl seems to handle installs form the cpan command line utility better than Activestate, who expect you to use their perl package manager as the default module installer (and don't supply a dmake program). Strawberry Perl also comes with a C compiler so can build modules that are a mixture of Perl and C code.
And make sure mozrepl is running before you try to install.

Changing installation directory of CPAN perl module using MinGW

I installed MinGW for installing perl modules from CPAN. after successful installation in C:/MinGW, I started msys.bat typed
cpan
cpan> install File::List
The module installed successfully. But it is not found in lib or site directory of c:/perl.
It is installed in C:\MinGW\msys\1.0\lib\perl5\site_perl\5.8\File instead.
How could I change the installation directory of CPAN modules to c:/perl/site or c:/perl/lib?
I used all default setting of MinGW. OS is Windows 7. Perl version 5.12.2.
"How could I change the installation directory of CPAN modules to c:/perl/site or c:/perl/lib?"
It's not clear to me why you would want to do that. If you used MinGW to install modules from CPAN, it is presumably because you want the advantages of the MinGW toolset (as described at
http://mingw.org/). And MinGW presumably knows what it is doing when it installs in the directory you cited.
If you really want to install to c:/perl/site or c:/perl/lib, you should probably use the cpan client that comes with Perl itself.
I figured out the problem. I don't have Microsoft Visual C++ redistributable 2008, 2010. I installed it and my problem is solved. May be Perl module builds which requires C compiler required this components.
Anyone ever have similar experience?

Installing Class::Inspector Perl module

I am a windows 7 (64 bit) user. I was trying to install Class::Inspector module in Perl. However it requred Nmake15.exe. I have tried to download the exe and when I run it, there is an pop up message stating that
The program or feature Nmake15.exe cannot start or run due to incompatibility with 64-bit versions of Windows
Could anyone advice on this? Thanks. This is a pre-requisite module required by SOAP::Lite.
nmake 1.5 is very old, and getting a modern version involves installing the massive Visual Studio suite. As an alternative, you can use dmake which works just as well.
In addition, your version of ActivePerl is quite out of date. I believe more recent versions now ship with a make program and will run much better on Windows.
Finally, Strawberry Perl is in many ways a better distribution of Perl on Windows. It comes with a complete Perl module build toolchain including dmake and a C compiler. You should be able to install most modules on CPAN using its preconfigured CPAN shell.
Class::Inspector is a pure-Perl module. Therefore, you could easily install it by copying the contents of the lib/ directory into one of your #INC paths.
This does not solve your problem with installing modules in general, though. That's why you should install a 64 bit version of nmake. By installing the Windows SDK, the nmake utility will be available at "C:\Program Files (x86)\Microsoft Visual Studio...\VC\bin\amd64\nmake.exe" (microsoft.com).

Trying to install Moose-2.000 via PPM/Activestate 5.12 on Win32 - 404 not found

This is a peculiar error that hasn't come up before. I'm using PPM in Windows to install modules for Perl. Works fine with tons of modules. But it seems like something is screwy with the Moose-2.000 package and I have no idea how to fix this.
To duplicate the error:
Install newest version of Activestate on windows machine
PPM into the cmd
search "moose"
mark Moose for install and install it
it says:
Moose marked for install
Installing package ...
Downloading Moose-2.0000 ... not found
Installing package failed
ERROR: 404 Not Found
I added virtually all the repos i could find but this seems to be coming from activestate's.
Forgive me, but I actually have no idea how to install a module manually (without the very simple GUI). I've downloaded the tar file, unzipped it and ran 'makefile.pl'. I copied the lib files to the /perl/site/lib folder.
Unfortunately, PPM expects a PPD wrapper (or something) so I can't do a command line install like "ppm install URL-of-package".
Can anyone attempt this and let me know if you have any luck? If not, please give a step by step on how to install this particular package. I'd be grateful since a bunch of other stuff (like a Twitter package) depends on it!
Thanks
UDPATE:
ok it looks like v2.000 simply doesn't exist yet for Win32. so i was able to install v1.25 in the following workaround, explained in the activestate bugtracker (see comments)
Workaround:
1) Find the latest available version for your platform here:
http://ppm4.activestate.com/idx/MOO...MY.html
Mouse over the icons in the PPMX column to see the target platform and Perl
version.
2) Copy the URL of the .ppmx file
3) Use the URL as an argument to 'ppm install'. For example, for 5.12 Win x86:
ppm install
http://ppm4.activestate.com/MSWin32-x86/5.12/1200/D/DR/DROLSKY/Moose-1.25.ppmx
I can see same problem - it looks like quirk on ActiveState side. On their package index there is still only 1.25 available. Maybe just the changes are yet to be propaged to mirrors.
Edit: I recently upgraded to Moose 2.0001, which seems to be fixed. However I got conflict with Class-MOP that comes with ActivePerl 5.12. It turned out that Class::MOP and Moose has been merged together. Solution was to remove both Class-MOP and Moose prior installation:
ppm rem Class::MOP --force
ppm rem Class::MOP --area perl --force
ppm rem Moose --area perl --force
ppm inst Moose