【问题标题】:Compiling mod_perl using apache2 and ActivePerl 5.16?使用 apache2 和 ActivePerl 5.16 编译 mod_perl?
【发布时间】:2013-08-02 01:43:21
【问题描述】:

我在 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 初学者,我只想在我的服务器上启动并运行一些软件(主要基于 Perl)。有什么建议吗?

【问题讨论】:

  • 您是否尝试像上面所说的那样设置环境变量MP_USE_MY_EXTUTILS_EMBED=1?不知道那会做什么,但试一试也无妨
  • 最终设置MP_USE_MY_EXTUTILS_EMBED=1 似乎确实有效。事实上,我刚刚从它的网站下载了 ActivePerl 5.16 并安装了它,并用新的 cpan 下载了所有必要的模块。

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


【解决方案1】:

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

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

【讨论】:

  • 我也觉得这很奇怪,因为 Perl 5.17.4 附带了 1.30
  • 我不知道有什么问题或为什么有什么问题:我下载并安装了 ActivePerl 5.16,并更改了使用这个新安装的路径。然后我使用新安装的 ActivePerl 中的cpan 来安装各种模块。但是,我们将看看我的编译进展如何......
【解决方案2】:

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

MP_USE_MY_EXTUTILS_EMBED=1

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

【讨论】:

    猜你喜欢
    • 2018-03-24
    • 2014-01-24
    • 2011-07-20
    • 2020-08-13
    • 2010-09-09
    • 2011-06-29
    • 2015-01-17
    • 1970-01-01
    • 2018-05-30
    相关资源
    最近更新 更多