Strawberry Perl 与 mod_perl2:从 CPAN 构建 Apache2 模块

发布于 2024-10-01 10:40:46 字数 3577 浏览 5 评论 0原文

我已经安装了 Strawberry Perl 5.10 和 mod_perl2 mod_perl 邮件列表上的说明没有问题。但是,尝试安装我的脚本使用的各种 Apache2:: 模块会导致错误。尽管如此,我还是能够安装一个(Apache2::Reload):

C:\>cpan -f Apache2::Reload
CPAN: CPAN::SQLite loaded ok (v0.199)
Database was generated on Tue, 09 Nov 2010 02:40:29 GMT
Running install for module 'Apache2::Reload'
Running make for P/PH/PHRED/Apache-Reload-0.11.tar.gz
CPAN: Digest::SHA loaded ok (v5.48)
CPAN: Compress::Zlib loaded ok (v2.03)
Checksum for C:\strawberry\cpan\sources\authors\id\P\PH\PHRED\Apache-Reload-0.11
.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.66)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.40)
CPAN: Module::CoreList loaded ok (v2.36)

  CPAN.pm: Going to build P/PH/PHRED/Apache-Reload-0.11.tar.gz

Cannot opendir Y:\Apache\APACHE~2\lib: No such file or directory at C:/strawberr
y/perl/site/lib/Apache2/Build.pm line 1664.
Warning: No success on command[C:\strawberry\perl\bin\perl.exe Makefile.PL]
CPAN: YAML loaded ok (v0.71)
  PHRED/Apache-Reload-0.11.tar.gz
  C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install

C:\>

...只需将几个 .pm 文件复制到 site/lib 即可。然而,其他的我不太确定。例如,Apache2::RequestRec 给我以下错误:

C:\>cpan -f Apache2::RequestRec
CPAN: CPAN::SQLite loaded ok (v0.199)
Database was generated on Tue, 09 Nov 2010 02:40:29 GMT
CPAN: Module::CoreList loaded ok (v2.36)
Running install for module 'Apache2::RequestRec'
Running make for G/GO/GOZER/mod_perl-2.0.4.tar.gz
CPAN: Digest::SHA loaded ok (v5.48)
CPAN: Compress::Zlib loaded ok (v2.03)
Checksum for C:\strawberry\cpan\sources\authors\id\G\GO\GOZER\mod_perl-2.0.4.tar
.gz ok
CPAN: Archive::Tar loaded ok (v1.66)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.40)

  CPAN.pm: Going to build G/GO/GOZER/mod_perl-2.0.4.tar.gz

no conflicting prior mod_perl version found - good.

Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before
proceeding.


Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):


Please provide the location of the Apache directory:  C:\Program Files\Apache So
ftware Foundation\Apache2.2
[  error] Unable to open C:\Program Files\Apache Software Foundation\Apache2.2/a
p_release.h: No such file or directory
[  error] Unable to determine server version, aborting.
[  error] Please specify MP_APXS or MP_AP_PREFIX.
Warning: No success on command[C:\strawberry\perl\bin\perl.exe Makefile.PL]
CPAN: YAML loaded ok (v0.71)
  GOZER/mod_perl-2.0.4.tar.gz
  C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install

C:\>

Is there sometricking to compiling Apache2:: module under Strawberry Perl?我还需要编译我自己的 Apache 二进制文件吗? (如果是这样,我可以使用草莓提供的制作工具来做到这一点吗?)

I have Strawberry Perl 5.10 and mod_perl2 installed per these instructions on the mod_perl mailing list without a problem. However, trying to install various Apache2:: modules that my scripts use result in errors. One (Apache2::Reload) I was able to install despite this:

C:\>cpan -f Apache2::Reload
CPAN: CPAN::SQLite loaded ok (v0.199)
Database was generated on Tue, 09 Nov 2010 02:40:29 GMT
Running install for module 'Apache2::Reload'
Running make for P/PH/PHRED/Apache-Reload-0.11.tar.gz
CPAN: Digest::SHA loaded ok (v5.48)
CPAN: Compress::Zlib loaded ok (v2.03)
Checksum for C:\strawberry\cpan\sources\authors\id\P\PH\PHRED\Apache-Reload-0.11
.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.66)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.40)
CPAN: Module::CoreList loaded ok (v2.36)

  CPAN.pm: Going to build P/PH/PHRED/Apache-Reload-0.11.tar.gz

Cannot opendir Y:\Apache\APACHE~2\lib: No such file or directory at C:/strawberr
y/perl/site/lib/Apache2/Build.pm line 1664.
Warning: No success on command[C:\strawberry\perl\bin\perl.exe Makefile.PL]
CPAN: YAML loaded ok (v0.71)
  PHRED/Apache-Reload-0.11.tar.gz
  C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install

C:\>

...just by copying a couple .pm files to site/lib. However, the others I am less sure about. For example, Apache2::RequestRec gives me the following errors:

C:\>cpan -f Apache2::RequestRec
CPAN: CPAN::SQLite loaded ok (v0.199)
Database was generated on Tue, 09 Nov 2010 02:40:29 GMT
CPAN: Module::CoreList loaded ok (v2.36)
Running install for module 'Apache2::RequestRec'
Running make for G/GO/GOZER/mod_perl-2.0.4.tar.gz
CPAN: Digest::SHA loaded ok (v5.48)
CPAN: Compress::Zlib loaded ok (v2.03)
Checksum for C:\strawberry\cpan\sources\authors\id\G\GO\GOZER\mod_perl-2.0.4.tar
.gz ok
CPAN: Archive::Tar loaded ok (v1.66)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.40)

  CPAN.pm: Going to build G/GO/GOZER/mod_perl-2.0.4.tar.gz

no conflicting prior mod_perl version found - good.

Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before
proceeding.


Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):


Please provide the location of the Apache directory:  C:\Program Files\Apache So
ftware Foundation\Apache2.2
[  error] Unable to open C:\Program Files\Apache Software Foundation\Apache2.2/a
p_release.h: No such file or directory
[  error] Unable to determine server version, aborting.
[  error] Please specify MP_APXS or MP_AP_PREFIX.
Warning: No success on command[C:\strawberry\perl\bin\perl.exe Makefile.PL]
CPAN: YAML loaded ok (v0.71)
  GOZER/mod_perl-2.0.4.tar.gz
  C:\strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install

C:\>

Is there some trick to compiling Apache2:: modules under Strawberry Perl? Do I need to compile my own Apache binaries too or something? (If so, can I do that with the make tools supplied with Strawberry?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

对岸观火 2024-10-08 10:40:46

如果从源代码编译 apache,则应该有来自 apache 的 apxs.exe。
将其添加到PATH。您需要某些 Apache:: 位的 apache 源代码。

If you compile apache from source, you should have apxs.exe from apache.
Add that to PATH. You need the apache source code for some Apache:: bits.

小梨窩很甜 2024-10-08 10:40:46

通过这些指令进行安装实际上会安装除 Apache2::Reload 之外的所有 Apache2:: 模块。

Installing via those instructions actually installs all the Apache2:: modules, except for Apache2::Reload.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文