使用apache2和ActivePerl 5.16编译mod_perl?

时间:2013-08-02 01:43:22

标签: perl rhel mod-perl apache2.2 activeperl

我在RHEL 5.9服务器上使用ActivePerl 5.16。我已经设置了PATH变量,因此将首先找到ActivePerl可执行文件。现在我正在尝试编译mod_perl.so。但是,命令perl Makefile.PL MP_APXS=/usr/sbin/apxs会产生:

I have found ExtUtils::Embed 1.3001 at

  /opt/ActivePerl-5.16/lib/ExtUtils/Embed.pm

This is probably not the right one for this perl version. Please make sure
there is only one version of this module installed and that it is the one
that comes with this perl version.

If you insist on using the ExtUtils::Embed as is set the environment
variable MP_USE_MY_EXTUTILS_EMBED=1 and try again.

Details: expecting ExtUtils::Embed 1.30 (according to Module::CoreList)

BEGIN failed--compilation aborted at lib/Apache2/Build.pm line 64.
Compilation failed in require at Makefile.PL line 37.
BEGIN failed--compilation aborted at Makefile.PL line 37.

我对这一切有点困惑......我是Perl tyro,我只想在我的服务器上运行一些软件(基于Perl)。有什么建议吗?

2 个答案:

答案 0 :(得分:0)

使用ActivePerl的目的是能够使用ppm。不幸的是,根据mod_perl 2.0.8 status page,它不能从ppm存储库中获得。

症状确实表明一些奇怪的东西。显然ExtUtils :: Embed 1.31来自5.19.2发行版。您的安装似乎确实存在问题。

答案 1 :(得分:0)

我会将此作为答案发布,因为它似乎有效。要更正此错误,请设置环境变量:

MP_USE_MY_EXTUTILS_EMBED=1

CPAN可能安装了您下载的最新版本的模块,而不是已经与Perl 5.16一起发布的模块。这个环境变量必须告诉mod_perl期望ExtUtils :: Embed 1.31而不是1.30。