2

我正在尝试在 XAMPP 上使用 cpan 安装模块。我正在运行 Windows 7。

在给出此提示后立即:

CPAN.pm:将构建 J/JE/JESSE/HTTP-Server-Simple-0.43.tar.gz

它提示“找不到所需的nmake可执行文件,并尝试获取它。

之后,会出现一个弹出窗口,说明程序“??\c:\xampp\perl\bin\Nmake15.exe 由于与 64 位版本的 Windows 不兼容而无法运行。

我下载了 VC++ 并将 make.exe 从该安装复制到我的 perl/bin 以替换原始的 make.exe。这仍然没有奏效。知道如何让安装与 CPAN 一起使用吗?

4

3 回答 3

6

XAMPP comes with a crippled Perl mostly due to the "Apache Friends" being clueless morons. I suggest installing Strawberry Perl additionally, then using that installation from your Perl programs. Module installation in Strawberry goes the usual straight way.

于 2011-02-02T10:04:39.230 回答
0

Had the same problem that the poster, using XAMPP too, and did the following to be able to install modules on windows 7 - 64 bits

Moreover, with this trick you don't have to change path to perl on your perl scripts in windows that were made for most linux servers, this is, keeping #!/usr/bin/perl and use them just from XAMPP locally in your windows box.

  • Just as daxim said, get away from XAMPP included perl.
  • Download ActivePerl from ActiveState (choose your 32 or 64 bit flavor).
  • The package manager GUI is just great (make sure to select View -> All packages, to search..)
  • Install the packages you need
  • By default ActivePerl installs on C:\perl (or C:\Perl64)
  • Use the tool 'reloc_perl' inside "bin" directory to relocate your perl installation to \usr... issuing the following command from "bin" folder: reloc_perl \usr
  • Now you can just use #!/usr/bin/perl on your perl scripts using ActivePerl
  • If you want to add modules later, you'll have to delete \usr and reloc again, since they get installed on the original directory (which is not deleted by default)
于 2011-04-17T19:00:33.853 回答
0

@daxim 说的是真的。使用http://strawberryperl.com/releases.html中的 Strawberry Perl 5.14 。由于到目前为止已经实现了很多模块,因此您可以轻松地进行 ppm,而无需添加 repos。

于 2014-01-13T10:24:42.850 回答