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.
Related
hi am trying to install perl module from cpan in my windows machine am getting below error after hitting two times yes .
Checking if your kit is complete...
Warning: the following files are missing in your kit:
README
Please inform the author.
Writing Makefile for Digest::Perl::MD5
'nmake' is not recognized as an internal or external command,
operable program or batch file.
nmake -- 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 D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz
Is already unwrapped into directory C:\Perl\cpan\build\Spreadsheet-ParseExcel
0.65
CPAN.pm: Going to build D/DO/DOUGW/Spreadsheet-ParseExcel-0.65.tar.gz
'nmake' is not recognized as an internal or external command,
operable program or batch file.
nmake -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
>perl exceltoxml.pl
Can't locate Spreadsheet/ParseExcel.pm in #INC (#INC contains: C:/Perl/site/lib
C:/Perl/lib .) at exceltoxml.pl line 4.
BEGIN failed--compilation aborted at exceltoxml.pl line 4.
I have tried 5 times.
nmake' is not recognized as an internal or external command
Sinan Ünür is right. The error message is that you don't have nmake installed. This means you are attempting to compile code (probably C code) and there's no C compiler or Make program.
A while ago, I would tell people that ActiveState doesn't fully support cpan because it can't compile code. ActiveState uses it's own pre-compiled packages available via the Perl Package Manager (PPM) which can be used from the command line or from a GUI interface. If a package isn't available via the PPM and it requires compilation, you were just out of luck. I would usually recommend Strawberry Perl instead of ActivePerl for this very reason. Strawberry Perl comes with the complete MinGW environment needed for those compilable CPAN modules.
However, about a half a dozen years ago, ActiveState put together an installable PPM package for the MinGW environment. Once this is installed, ActivePerl can use CPAN.
So you have two solutions:
Install this PPM package as Sinan Ünür mentioned in his answer. Then, try Spreadsheet::ParseExcel again.
Install Strawberry Perl instead of ActiveState's Perl. Strawberry Perl seems to be more compatible with the version of Perl found on Unix/Mac/Linux systems. Then try installing the Spreadsheet::ParseExcel package.
Okay, three solutions: Install Cygwin which will give you the complete Linux Environment on your Windows machine. It can take about two hours to install, but it comes with all of the GNU utilities you've known and love, most other Unix/Linux utilities, and the BASH shell.
It's what a lot of Linux/Unix homeboys use when they get sick of that ol' C:\> prompt. Cygwin comes with the latest version of Perl and works with every single CPAN package I've tried. There are a few minor issues (Like Termcaps) where things don't quite work the way they're suppose to, but I'm generally happy with it. It even comes with X11 and allows you to run XWindow apps, and even use XWindow apps across systems -- just like a REAL operating system does!
There maybe a few instances where CPAN modules may still have issues on Windows. One has to do with archiving and unarchiving modules and the missing libz library. However, installing this MinGW package (or using Strawberry Perl or Cygwin) will solve about 95% of the cpan installation issues.
I have tried 5 times.
Computers are deterministic things. That means, unless you change the conditions under which a program runs, it will always do the same thing (except, maybe, if there is a solar flare or an EMP).
So, there is no difference between issuing the same command once versus five times. If it failed the first time, ceteris paribus, it fill fail all five times.
That said, it looks like you installed ActiveState Perl, but did not install the MinGW package which provides the gcc & dmake based build tools.
So,
C:\>ppm install MinGW
and then try to install packages.
You also have the option of building your own perl using the Community Edition of Microsoft Visual Studio 2013 tools, or any other supported compiler.
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?
Can you tell me where to find a guide on how to install a perl module?
I am trying to install the perl module:
http://metacpan.org/pod/WWW::Mechanize::Firefox::Installation
I am stuck at step 7. I am not sure where the problem lays exactly, although I can get mozrepl to appear under tools. All I know is that when I run use WWW::Mechanize::Firefox; I get the following type of result:
Cannot locate www/mechanize/firefox.pmin #INC<#INC contain:
C:/Perl/site/lib C:/Perl/lib
In the directory in which I have perl, if I type ppm install WWW-Mechanize-Firefox I get
"ppm install filed: Can't find any package that provide
WWW-Mechanize-Firefox"
I use Windows XP.
I would appreciate any help. Thank you!
Based on this error:
Cannot locate www/mechanize/firefox.pmin #INC<#INC contain: C:/Perl/site/lib C:/Perl/lib
You need to install the module.
If you are using Strawberry Perl for instance, you should be able to simply:
cpan WWW::Mechanize::Firefox
I believe ActiveState supports the above, as well as ppm install WWW::Mechanize::Firefox
EDIT: ActiveState's Instructions
EDIT:
During the install, some of the tests failed. I then went ahead and followed the steps you linked to. At that point I went back and ran the tests using:
cpan -t WWW::Mechanize::Firefox
The tests open and close various windows in FF.
I've used this in anger only under Linux.
The problem (back then) was that the WWW modules didn't include hard dependencies for the MozRepl modules, hence the manual install.
My own instructions (from about 3 years ago)
cpan WWW::Mechanize::Firefox
cpan MozRepl
cpan MozRepl::RemoteObject
However, if it worked for Craig then it might be all ok now.
I have had trouble with IPC-Run in 64-bit Active Perl. ActiveState says it doesn't work. But I find it not necessary for basic uses of WWW::Mechanize::Firefox. If you install App::cpanminus, and in run cpanm -n WWW::Mechanize::Firefox I find that it pushes through the install of IPC-Run and you can go ahead using mechanize firefox in 64-bit windows instantiations.
Hope this helps someone!
-lta
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.
I am trying to install wxperl on strawberry. I can't install Alien::wxWidgets. I tried everything I can think of. Usually I get an error like this one:
Creating library file: ..\..\src\stc\..\..\..\lib\gcc_dll\libwxmsw28u_stc.a
compilet.exp:fake:(.edata+0x3c): undefined reference to `boot_compilet'
compilet.exp:fake:(.edata+0x40): undefined reference to `boot_compilet'
I don't know what that means. I tried with wxWidgets v 2.8.12 and 2.9.3 and various options. I started with cpanm and later evoking perl Build.PL manually with all kinds of options.
I am on Windows 7 64 bit. I tried with 5.14.2 32bit and 64bit. I am pretty sure that my path has no other perl installation than the one I currently using.
Any ideas? Thanks!
Using strawberry-perl-5.16.3.1-32bit on Windows 7.
It seems that even though the build process crashes with the error message above, Alien::wxWidgets has, in fact, been successfully made, and is ready to install.
Got the same error message building Alien::wxWidgets from SVN trunk. I ran 'build test' and the tests passed so I ran 'build install'. Wx compiled successfully, all tests passed. Padre editor compiled successfully, all tests passed, and it works well.
It is also possible to install via PPM in Strawberry perl:
ppm set repository wxPerl http://www.wxperl.co.uk/repo29 (for WxWidgets-2.9.4)
ppm install Alien::wxWidgets (version 0.61)
Unfortunately, the latest version of Padre editor requires Alien::wxWidgets 0.62, so building Alien::wxWidgets from source is necessary to make Padre from CPAN.
Alternately, you can use the Citrus Perl distribution created by Mark Dootson. One caveat, the version of Perl, 5.16.1, is not the latest, but it is more recent than DWIM Perl build of Strawberry Perl 5.14.2.1 RC.
I would recommend using the latest Strawberry Perl 5.16.3, or 5.14.4.1 for security reasons because it has a a fix for the rehashing flaw which could be used for denial of service attacks. Described here:
http://www.vuxml.org/freebsd/CVE-2013-1667.html
One idea is to install DWIM Perl, which is a Perl distribution which contains Strawberry preloaded with a whole lot of commonly used CPAN modules, and includes Alien::wxWidgets.