新手求助~Windows 下Perl 模块安装

新手求助~Windows 下Perl 模块安装

各位大侠~

        请教一下如何在Windows 下安装从CPAN上下载下来的模块啊?


比如我 下载了个 Date::Calc模块



解压后在该目录下 >perl Makefile.PL

Warning: prerequisite Bit::Vector failed to load: Can't locate Bit/Vector.pm in @INC (@INC contains:
C:/perl/lib C:/perl/site/lib .) at (eval 4) line 3.
Warning: prerequisite Carp::Clan failed to load: Can't locate Carp/Clan.pm in @INC (@INC contains: C
:/perl/lib C:/perl/site/lib .) at (eval 5) line 3.
Writing Makefile for Date::Calc
Writing patchlevel.h for C:\perl\bin\perl.exe (5.006001)




然后 >nmake       报了好多错啊

cp lib/Date/Calendar/Year.pm blib\lib\Date\Calendar\Year.pm
cp lib/Date/Calendar/Profiles.pod blib\lib\Date\Calendar\Profiles.pod
cp lib/Date/Calc/Object.pm blib\lib\Date\Calc\Object.pm
cp lib/Date/Calendar/Year.pod blib\lib\Date\Calendar\Year.pod
cp lib/Date/Calc/Object.pod blib\lib\Date\Calc\Object.pod
cp Calc.pod blib\lib\Date\Calc.pod
cp lib/Date/Calendar/Profiles.pm blib\lib\Date\Calendar\Profiles.pm
cp Calc.pm blib\lib\Date\Calc.pm
cp Calendar.pm blib\lib\Date\Calendar.pm
cp Calendar.pod blib\lib\Date\Calendar.pod
        C:\perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib C:\Perl\lib\ExtUtils/xsubpp  -typemap C:\P
rl\lib\ExtUtils\typemap -typemap typemap Calc.xs > Calc.xsc && C:\perl\bin\perl.exe -IC:\Perl\lib -
C:\Perl\lib -MExtUtils::Command -e mv Calc.xsc Calc.c
        cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -Zi -DNDEBUG    -DVERSION=\"5.4\
  -DXS_VERSION=\"5.4\"  -IC:\Perl\lib\CORE  Calc.c
Calc.c
        cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -Zi -DNDEBUG    -DVERSION=\"5.4\
  -DXS_VERSION=\"5.4\"  -IC:\Perl\lib\CORE  DateCalc.c
DateCalc.c
DateCalc.c(510) : error C2061: syntax error : identifier 'Marted'
DateCalc.c(510) : error C2018: unknown character '0xec'
DateCalc.c(510) : error C2018: unknown character '0xec'
DateCalc.c(510) : error C2001: newline in constant
DateCalc.c(511) : error C2018: unknown character '0xec'
DateCalc.c(511) : error C2001: newline in constant
DateCalc.c(516) : error C2059: syntax error : ','
DateCalc.c(520) : error C2059: syntax error : ','
DateCalc.c(524) : error C2059: syntax error : ','
DateCalc.c(52 : error C2059: syntax error : ','
DateCalc.c(530) : error C2001: newline in constant
DateCalc.c(532) : error C2059: syntax error : ','
DateCalc.c(540) : error C2059: syntax error : ','
DateCalc.c(545) : error C2059: syntax error : '}'
DateCalc.c(56 : warning C4045: '2?, ' : array bounds overflow
DateCalc.c(56 : error C2059: syntax error : 'constant'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xe1'
DateCalc.c(56 : error C2001: newline in constant
DateCalc.c(572) : error C2059: syntax error : ','
DateCalc.c(575) : error C2059: syntax error : ','
DateCalc.c(57 : error C2059: syntax error : ','
DateCalc.c(581) : error C2059: syntax error : ','
DateCalc.c(584) : error C2059: syntax error : ','
DateCalc.c(587) : error C2059: syntax error : ','
DateCalc.c(590) : error C2059: syntax error : ','
DateCalc.c(594) : error C2059: syntax error : ','
DateCalc.c(598) : error C2059: syntax error : '}'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.





请教一下大家我安装的顺序对不对的啊?
应该怎么正确安装啊?

VC++我已经安装了的~~~
安装这个模块需要许多前提的模块,你要先安装那些必须的模块
这样的啊?

那就是说我安装的过程是没有问题的是吧?

从 CPAN上下载完了之后

>perl Makefile.PL
>nmake
>nmake test
>nmake install

是不是啊?


QUOTE:
原帖由 sumin_0527 于 2008-1-24 15:31 发表
这样的啊?

那就是说我安装的过程是没有问题的是吧?

从 CPAN上下载完了之后

>perl Makefile.PL
>nmake
>nmake test
>nmake install

是不是啊?

一般的cgi模块安装的顺序都是这样的,但是也有不同,你可以解压后读下其中的README.txt,预祝你成功
恩~
老大~
我按照README.txt中说的把其它的模块都安装成功了
可是到安装 Date::Calc模块的时候又报错了~说有非法字符和语法错误~这个是怎么回事啊?安装包有问题?

C:\123\Date-Calc-5.4>perl Makefile.PL
Writing Makefile for Date::Calc
Writing patchlevel.h for C:\perl\bin\perl.exe (5.006001)

C:\123\Date-Calc-5.4>nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cp lib/Date/Calendar/Year.pm blib\lib\Date\Calendar\Year.pm
cp lib/Date/Calendar/Profiles.pod blib\lib\Date\Calendar\Profiles.pod
cp lib/Date/Calc/Object.pm blib\lib\Date\Calc\Object.pm
cp lib/Date/Calendar/Year.pod blib\lib\Date\Calendar\Year.pod
cp lib/Date/Calc/Object.pod blib\lib\Date\Calc\Object.pod
cp Calc.pod blib\lib\Date\Calc.pod
cp lib/Date/Calendar/Profiles.pm blib\lib\Date\Calendar\Profiles.pm
cp Calc.pm blib\lib\Date\Calc.pm
cp Calendar.pm blib\lib\Date\Calendar.pm
cp Calendar.pod blib\lib\Date\Calendar.pod
        C:\perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib C:\Perl\lib\ExtUtils/xsubpp  -typemap C:\Pe
rl\lib\ExtUtils\typemap -typemap typemap Calc.xs > Calc.xsc && C:\perl\bin\perl.exe -IC:\Perl\lib -I
C:\Perl\lib -MExtUtils::Command -e mv Calc.xsc Calc.c
        cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -Zi -DNDEBUG    -DVERSION=\"5.4\"
  -DXS_VERSION=\"5.4\"  -IC:\Perl\lib\CORE  Calc.c
Calc.c
        cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -Zi -DNDEBUG    -DVERSION=\"5.4\"
  -DXS_VERSION=\"5.4\"  -IC:\Perl\lib\CORE  DateCalc.c
DateCalc.c
DateCalc.c(510) : error C2061: syntax error : identifier 'Marted'
DateCalc.c(510) : error C2018: unknown character '0xec'
DateCalc.c(510) : error C2018: unknown character '0xec'
DateCalc.c(510) : error C2001: newline in constant
DateCalc.c(511) : error C2018: unknown character '0xec'
DateCalc.c(511) : error C2001: newline in constant
DateCalc.c(516) : error C2059: syntax error : ','
DateCalc.c(520) : error C2059: syntax error : ','
DateCalc.c(524) : error C2059: syntax error : ','
DateCalc.c(52 : error C2059: syntax error : ','
DateCalc.c(530) : error C2001: newline in constant
DateCalc.c(532) : error C2059: syntax error : ','
DateCalc.c(540) : error C2059: syntax error : ','
DateCalc.c(545) : error C2059: syntax error : '}'
DateCalc.c(56 : warning C4045: '2?, ' : array bounds overflow
DateCalc.c(56 : error C2059: syntax error : 'constant'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xaa'
DateCalc.c(56 : error C2018: unknown character '0xe1'
DateCalc.c(56 : error C2001: newline in constant
DateCalc.c(572) : error C2059: syntax error : ','
DateCalc.c(575) : error C2059: syntax error : ','
DateCalc.c(57 : error C2059: syntax error : ','
DateCalc.c(581) : error C2059: syntax error : ','
DateCalc.c(584) : error C2059: syntax error : ','
DateCalc.c(587) : error C2059: syntax error : ','
DateCalc.c(590) : error C2059: syntax error : ','
DateCalc.c(594) : error C2059: syntax error : ','
DateCalc.c(598) : error C2059: syntax error : '}'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
你用activeperl的PPM试试看
我这边不知道为什么啊~用PPM的时候好像老是没什么反应,报错如下:

PPM> install Date::Calc
Install package 'Date-Calc?' (y/N): y
Installing package 'Date-Calc'...
Error installing package 'Date-Calc': Could not locate a PPD file for package Date-Calc


请高手们帮忙啊~


QUOTE:
原帖由 xiaoyu9805119 于 2008-1-24 15:55 发表
你用activeperl的PPM试试看

ppm install 模块
老大~~看看我哪里有错么?
还是网络的问题?

C:\>ppm install Date::Calc
Installing package 'Date-Calc'...
Error installing package 'Date-Calc': Could not locate a PPD file for package Date-Calc

C:\>ppm search
Error connecting to 'http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn:/PPMServer'.

C:\>perl -v

This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2001, Larry Wall

Binary build 638 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Apr 13 2004 19:24:21

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
用5.8.8的perl,然后使用里面的PPM管理器,把需要安装的模块装好。你需要的模块里面是可以直接安装的。怎么使用那个管理器就不用说拉吧~~