我只是安装了ack并在命令行中运行它,没有遇到任何问题。
Strawberry Perl安装正确吗?您能从cmd.exe中运行"perl"吗?
C:\> perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
...
App::Ack是否已正确安装?
C:\> cpan App::Ack
...
Installing C:\strawberry\perl\site\lib\App\Ack.pm
Installing C:\strawberry\perl\site\lib\App\Ack\Plugin.pm
Installing C:\strawberry\perl\site\lib\App\Ack\Repository.pm
Installing C:\strawberry\perl\site\lib\App\Ack\Resource.pm
Installing C:\strawberry\perl\site\lib\App\Ack\Plugin\Basic.pm
Installing C:\strawberry\perl\bin\ack
Installing C:\strawberry\perl\bin\ack.bat
Writing C:\strawberry\perl\site\lib\auto\ack\.packlist
Appending installation info to C:\strawberry\perl\lib/perllocal.pod
PETDANCE/ack-1.88.tar.gz
C:\strawberry\c\bin\dmake.EXE install UNINST=1 -- OK
如果是这样的话,我不明白为什么你不能从命令行运行 "ack" :
C:\> ack --version
ack 1.88
Copyright 2005-2009 Andy Lester, all rights reserved.
This program is free software
under the same terms as Perl itself.
如果没有起作用,那么在这个链条中哪里出了问题?例如,如果你不能从命令行运行“perl”,那么Strawberry没有正确安装(或者不在你的路径中),你需要解决这个问题。但是,否则,ack会被安装到与“perl”相同的路径中,并带有“ack.bat”包装器,因此如果你可以运行“perl”,你应该能够运行“ack”。