美好的一天。
我尝试在ubuntu上安装mod_perl(2.0.8),并使用Apache 2.4.7
首先我运行
$ perl Makefile.PL MP_APXS=$HOME/httpd/bin/apxs MP_APR_CONFIG=$HOME/httpd/bin/apr-1-config
,而不是
make&&使测试产生错误
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 `/home/perlito/mod_perl-2.0.8/WrapXS/Apache2/Connection'
make[2]: *** [subdirs] Error 2
make[2]: Leaving directory `/home/perlito/mod_perl-2.0.8/WrapXS/Apache2'
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory `/home/perlito/mod_perl-2.0.8/WrapXS'
make: *** [subdirs] Error 2
有什么想法?
谢谢。
更新
make source_scan给我这个错误
$ make source_scan
/home/perlito/perl5/bin/perl build/source_scan.pl
panic: multiple types without intervening comma in
' int(*ap_vhost_iterate_conn_cb)(void* baton, conn_rec* conn, server_rec* s)'
whited-out as
' int(*ap_vhost_iterate_conn_cb)( )'
panic: multiple types without intervening comma in
' void(*Perl_ophook_t)(PerlInterpreter* my_perl , OP*)'
whited-out as
' void(*Perl_ophook_t)( )'
panic: multiple types without intervening comma in
' void(*Perl_cpeep_t)(PerlInterpreter* my_perl , OP *, OP *)'
whited-out as
' void(*Perl_cpeep_t)( )'
panic: multiple types without intervening comma in
' void(*globhook_t)(PerlInterpreter* my_perl )'
whited-out as
' void(*globhook_t)( )'
Expecting parenth after identifier in `regexp_engine const * Perl_current_re_engine(PerlInterpreter* my_perl )'
after `regexp_engine ' at lib/ModPerl/CScan.pm line 819.
at lib/ModPerl/CScan.pm line 819.
ModPerl::CScan::do_declaration('regexp_engine const * Perl_current_re_engine(PerlInterpreter*...', 'HASH(0x92323f0)', 'HASH(0x9241a80)') called at lib/ModPerl/CScan.pm line 762
ModPerl::CScan::do_declarations('ARRAY(0x921b1a8)', 'HASH(0x92323f0)', 'HASH(0x9241a80)') called at /home/perlito/perl5/lib/site_perl/5.18.2/Data/Flow.pm line 93
Data::Flow::request('Apache2::ParseSource::Scan=ARRAY(0x92329b0)', 'parsed_fdecls') called at /home/perlito/perl5/lib/site_perl/5.18.2/Data/Flow.pm line 46
Data::Flow::get('Apache2::ParseSource::Scan=ARRAY(0x92329b0)', 'parsed_fdecls') called at lib/Apache2/ParseSource.pm line 68
Apache2::ParseSource::Scan::get('Apache2::ParseSource::Scan=ARRAY(0x92329b0)', 'parsed_fdecls') called at lib/Apache2/ParseSource.pm line 413
Apache2::ParseSource::get_functions('Apache2::ParseSource=HASH(0x92327d0)') called at lib/Apache2/ParseSource.pm line 509
Apache2::ParseSource::write_functions_pm('Apache2::ParseSource=HASH(0x92327d0)') called at build/source_scan.pl line 18
make: *** [source_scan] Error 255
不幸的是上游mod_perl尚未移植到apache 2.4。
Afaik Debian开发人员继续进行了一些更改,使您可以编译和使用mod_perl在Apache 2.4上。这是他们的源树http://svn.apache.org/repos/asf/perl/modperl/branches/httpd24
尝试在make
之前运行这些命令:
make source_scan
make xs_generate
我通过通过apt-get安装apache2并安装apache2 :: requestRec通过cpan