开发者

installing CPAN module on windows

I am trying to install CPAN module on Windows 7. I don't have Active Perl so can't use PPM package.

The steps given on all sites include these three steps: make, make test and make install. I know that make is unix command and won't run on Windows.

What command I shall run on Windows to complete installation?

I downloaded dmake from CPAN's site as mentioned by one of the site but when I run it, it gives following error -

D:\Parse-RecDescent-1.965001.tar\Parse-RecDescent-1.965001>D:\dmake\dmake\dmake dmake: Error: -- `D:\indigoampp\perl-5.12.1\libConfig.pm' not found, and can't be made

Please let me know how shall I complete these steps. Thanks!

PS: Again, PPM is not an option.


Thanks everyone.

There is a file called Config_heavy.pl at indigoampp\perl-5.12.1\lib location. It had a line: make='nmake'. I changed that to make='dmake' as I am using dmake commands.

After this, I didn't need to change DIRFILESEP in Makefile of each module. It is now generating \\ as mentioned in of the above links.

So I can run dmake, dmake test and dmake install now. However it doesn't do anything. It didn't copy pm file/files at respective locations. Why so??

Anyway, I manually copied pm file/files in hope that everything should work. However that I could do before as well. Why did I run makefile.pl and dmake commands??

Also, my aim was to install Apache2::Request module. I found that it's dependent on multiple modules. I downloaded those modules and ran a开发者_如何学JAVAbove commands for them - no error as such. In the end, when I ran these steps for Apache2::Request module, I get following error in dmake command:

D:\libapreq2-2.12.tar\libapreq2-2.12>dmake
dmake:  makefile:  line 25:  Warning: -- Duplicate target [Release]
dmake:  makefile:  line 25:  Warning: -- Duplicate target [Release]
dmake:  makefile:  line 25:  Warning: -- Duplicate target [!=]
dmake:  makefile:  line 25:  Error: -- Expecting macro or rule defn, found neith
er

I don't find anything suspicious in Makefile under libapreq2-2.12.tar\libapreq2-2.12 folder. The partical content of Makefile (around the error line) is:

LIBAPREQ=libapreq2
APREQ2_TEST=apreq2_test
CGITEST=test_cgi
MOD=mod_apreq2

!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE CFG="Release"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "Release" (based on "Win32 (x86) Console Application")
!MESSAGE "Debug" (based on "Win32 (x86) Console Application")
!MESSAGE 
!ERROR An invalid configuration is specified.
!ENDIF 

!IF "$(APACHE)" == ""
!MESSAGE No Apache directory was specified.
!MESSAGE Please run Configure.bat to specify a valid Apache directory.
!ERROR
!ENDIF

Can anyone help with this & above question (why it didn't copy pm files automatically)? Thanks for your time!


Looks like you're using Indigo Perl. According to their web site, they have their own package manager called IPM - have you tried that?

But for Windows Perl work, I'd really recommend looking at Strawberry Perl.


Sometimes to install a Perl module, all you need do is copy the .pm file to the appropriate directory in perl/site or perl/lib. The standard procedure for installing a Perl module always involves running 'make', but in many cases, all the 'make' does is to copy the .pm file to perl/site or perl/lib. But when the Perl module needs low level access to the Windows libraries, then you need more than just 'make', you need a whole C tool chain.

If ActiveState Perl is against your religion, then consider downloading and installing a Cygwin environment. Select Perl and the C development tools (called binutils) for the Cygwin install.

But I tell ya, its hard to beat ActiveState Perl. It is the most complete Perl solution for a Windows platform. And its free!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜