在Apache httpd-2.4.9上安装mod_perl-2.0.8

时间:2014-05-05 13:02:14

标签: apache perl mod-perl

我需要在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.

1 个答案:

答案 0 :(得分: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。