【问题标题】:Installing mod_perl-2.0.8 on Apache httpd-2.4.9在 Apache httpd-2.4.9 上安装 mod_perl-2.0.8
【发布时间】:2014-06-21 19:06:51
【问题描述】:

我需要在带有 apache-2.4.9 的 linux redhat 操作系统中安装 mod_perl 2.0.8。我已成功安装“apache-2.4.9”,但在安装 mod_perl 2.0.8 时,Makefile.PL 成功执行,在执行 make 命令时抛出以下错误。谁能帮我解决这个错误。

perl Makefile.PL MP_APXS=/install/others/apache2/bin/apxs MP_APR_CONFIG=/install/others/httpd-2.4.9/srclib/apr/apr-1-config PREFIX=/install/others
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning] 
[warning]   LoadModule perl_module modules/mod_perl.so
[warning] 
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.

[warning] Check the results of
[warning] 
[warning]   $ /install/others/apache2/bin/apxs -q LIBEXECDIR
[warning] 
[warning] and adjust the LoadModule directive accordingly.

但是执行make命令时会抛出以下错误

make
cd "src/modules/perl" && make
...
...
cp Connection.pm ../../../blib/lib/Apache2/Connection.pm
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap /install/others/mod_perl-2.0.8/xs/typemap  Connection.xs > Connection.xsc && mv Connection.xsc Connection.c
gcc -c  -I/install/others/mod_perl-2.0.8/src/modules/perl -I/install/others/mod_perl-2.0.8/xs -I/install/others/httpd-2.4.9/srclib/apr/include -I/install/others/apache2/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include  -I/usr/include/gdbm -DMOD_PERL -DMP_COMPAT_1X -DLINUX -D_REENTRANT -D_GNU_SOURCE  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"2.000008\" -DXS_VERSION=\"2.000008\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  -DMP_HAVE_APR_LIBS Connection.c
Connection.xs: In function âXS_Apache2__Connection_remote_addrâ:
Connection.xs:117: error: âconn_recâ has no member named âremote_addrâ
Connection.xs: In function âXS_Apache2__Connection_remote_ipâ:
Connection.xs:134: error: âconn_recâ has no member named âremote_ipâ
Connection.xs:138: error: âconn_recâ has no member named âremote_ipâ
make[3]: *** [Connection.o] Error 1
make[3]: Leaving directory `/install/others/mod_perl-2.0.8/WrapXS/Apache2/Connection'
make[2]: *** [subdirs] Error 2
make[2]: Leaving directory `/install/others/mod_perl-2.0.8/WrapXS/Apache2'
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory `/install/others/mod_perl-2.0.8/WrapXS'
make: *** [subdirs] Error 2
dqmadmin@weblp0005:/install/others/mod_perl-2.0.8

谢谢,
Shanmugam A.

【问题讨论】:

    标签: apache perl mod-perl


    【解决方案1】:

    来自http://mail-archives.apache.org/mod_mbox/perl-dev/201206.mbox/%3C4FCD5101.4060206@PCCC.com%3E

    Connection.xs: In function 'XS_Apache2__Connection_remote_addr':
    ...
    

    为了解决这些问题,我编辑了 apache2_structures.map 和 StructureTable.pm 以将 remote_addr 和 remote_ip 更改为 client_addr 和 client_ip

    还有

    ServerRec.xs: In function 'XS_Apache2__ServerRec_loglevel':
    ...
    

    为了解决这个问题,我将 /xs/tables/current/Apache2/StructureTable.pm 更改为指向 log.level 而不是 loglevel。

    【讨论】:

      猜你喜欢
      • 2012-06-23
      • 2014-07-23
      • 2015-01-02
      • 2012-03-15
      • 1970-01-01
      • 2014-12-16
      • 2011-07-12
      • 2019-07-13
      • 2016-03-18
      相关资源
      最近更新 更多