首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Perl模块Apache-PageKit安装测试错误

Perl模块Apache-PageKit安装测试错误
EN

Stack Overflow用户
提问于 2013-07-11 22:10:46
回答 1查看 599关注 0票数 0

我已经安装了Apache::PageKit模块,在测试这个模块时,它显示了下面的错误。

但是使用下面的模块的可用性是存在的。

代码语言:javascript
复制
bash-3.2$
bash-3.2$ perl -MApache::PageKit -e1
bash-3.2$

bash-3.2$ ./t/TEST -start-httpd
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /install/others/Apache-PageKit-1.14/t/TEST -start-httpd --documentroot '/install/others/Apache-PageKit-1.14/eg'
/install/others/apache2/bin/httpd  -d /install/others/Apache-PageKit-1.14/t -f /install/others/Apache-PageKit-1.14/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS
using Apache/2.2.25 (prefork MPM)

waiting 60 seconds for server to start: .Syntax error on line 24 of /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf:
Can't locate loadable object for module Apache::URI in @INC (@INC contains: /tmp/apache_test /install/others/Apache-PageKit-1.14/blib/lib /install/others/Apache-PageKit-1.14/blib/arch /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /install/others/Apache-PageKit-1.14/t /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14\nCompilation failed in require at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\nBEGIN failed--compilation aborted\t(in cleanup) Can't locate loadable object for module Apache::URI in @INC (@INC contains: /tmp/apache_test /install/others/Apache-PageKit-1.14/blib/lib /install/others/Apache-PageKit-1.14/blib/arch /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /install/others/Apache-PageKit-1.14/t /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14\nCompilation failed in require at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\nBEGIN failed--compilation aborted at /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf line 28.\n
[  error]
server has died with status 255 (t/logs/error_log wasn't created, start the server in the debug mode)
sh: line 1: 25604 Terminated              /usr/bin/perl /install/others/Apache-PageKit-1.14/t/TEST -start-httpd --documentroot '/install/others/Apache-PageKit-1.14/eg'
bash-3.2$
bash-3.2$
bash-3.2$
bash-3.2$ perl -MApache::URI -e1
bash-3.2$

这里的第24行是<Perl>。因此pagekit无法解析此行。

代码语言:javascript
复制
bash-3.2$ vi /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf
# WARNING: this file is generated (from /install/others/Apache-PageKit-1.14/t/conf/extra.last.conf.in), do not edit
# generated on Thu Jul 11 08:09:38 2013
# 01: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:961
# 02: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:979
# 03: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:1452
# 04: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestConfig.pm:1564
# 05: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:502
# 06: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRunPerl.pm:107
# 07: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:713
# 08: /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/TestRun.pm:713
# 09: /install/others/Apache-PageKit-1.14/t/TEST:72

# Apache::Reload is very very helpfull during development,
# but it is not required. So install it and uncomment
# the following lines
#
# PerlModule Apache::Reload
# PerlInitHandler Apache::Reload
# PerlSetVar ReloadAll On

# <Perl >
<Perl>

# It is not necasary to preload this modules, but it helps

我该如何解决这个问题。

谢谢

Shanmugam A.

嗨,

感谢你的回复,现在我已经为这个组合安装了Perl 5.8.8,apache 2.2.25,Modperl 2.0.8和Apache2::PageKit,我在启动Apache时遇到了下面的错误。

代码语言:javascript
复制
bash-3.2$
bash-3.2$ /install/others/apache2/bin/apachectl start
[Mon Jul 15 11:28:10 2013] [error] Can't locate loadable object for module Apache::Constants in @INC (@INC contains: /install/others/lib/perl5/5.8.8 /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/ /install/others/lib64/perl5/5.8.8/x86_64-linux-thread-multi /install/others/lib/perl5/site_perl/5.8.8 /install/others/lib/perl5/site_perl /install/others/lib/CPAN/lib /dso/dsoapps/iesdev/qtngsas70/DSOMP/lib /dso/dsoapps/iesdev/qtngsas70/DSOMP/bin. /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /install/others/apache2) at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//mod_perl.pm line 14.\nCompilation failed in require at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//ModPerl/P2.pm line 2.\nBEGIN failed--compilation aborted at /install/others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//ModPerl/P2.pm line 2.\nCompilation failed in require at (eval 2) line 3.\n
[Mon Jul 15 11:28:10 2013] [error] Can't load Perl module ModPerl::P2 for server (null):0, exiting...

注意:我在这里设置从Unix到Linux服务器。在Unix中,它是Apache1.3.27、Apache1.27Apache::PageKit的组合,而在mod_perl配置中,它是默认添加的附加部分

代码语言:javascript
复制
#################################################################
<IfModule mod_perl.c>
  PerlModule ModPerl::P2
  <Location /P2>
     SetHandler perl-script
     PerlHandler ModPerl::P2
     PerlSendHeader On
  </Location>

  PerlModule ModPerl::P1
  <Location /P1>
     SetHandler perl-script
     PerlHandler ModPerl::P1
     PerlSendHeader On
  </Location>

  PerlModule Apache::DBI
#### Entered by Tom Frizzell April 25 2008
  PerlFixupHandler Apache::SIG

</IfModule>

###############################################################
# PageKit setup
PassEnv ORACLE_HOME ORACLE_SID ORACLE_USERID TAPEMON_HOME TAPEMON_LIB

<Perl>
use lib "/chshttp/prod/qtngsas70/DSOMP/lib";
</Perl>

SetHandler perl-script
PerlSetVar PKIT_ROOT /chshttp/prod/qtngsas70/DSOMP/www
PerlSetVar PKIT_SERVER test

PerlHandler +Apache::PageKit
<Perl>
        Apache::PageKit->startup('/chshttp/prod/qtngsas70/DSOMP/www', 'test');
</Perl>

PerlInitHandler +Apache::Reload
# Error Handling
PerlModule Apache::ErrorReport
PerlSetVar ErrorReportHandler display

在此配置中,我将所有Apache::PageKit更改为Apache2::PageKit以及相应的源代码。我刚刚将文件ModPerl::P1和ModPerl::P2从Unix服务器复制到Linux。但它显示了上述错误。

我应该知道如何解决这个问题。

谢谢

嗨,

当我访问页面时,显示的是500内部错误。apache日志说(在perl模块Apache::SIG中找不到对象方法"is_main“)。我应该知道如何解决这个问题。

代码语言:javascript
复制
bash-3.2$ more error_log
[Sun Jul 14 09:38:12 2013] [notice] Apache/2.2.25 (Unix) configured -- resuming normal operations
[Sun Jul 14 09:40:01 2013] [notice] caught SIGTERM, shutting down
[Tue Jul 16 06:39:59 2013] [notice] Apache/2.2.25 (Unix) mod_perl/2.0.8 Perl/v5.8.8 configured -- resuming normal operations
[Tue Jul 16 06:41:01 2013] [error] [client 10.191.51.22] Can't locate object method "is_main" via package "Apache2::RequestRec" at /install/
others/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi//Apache/SIG.pm line 14.\n

我更新的apache配置是

代码语言:javascript
复制
#################################################################
<IfModule mod_perl.c>
  PerlModule ModPerl::P2
  <Location /P2>
     SetHandler perl-script
     PerlHandler ModPerl::P2
#    PerlSendHeader On
      PerlOptions +ParseHeaders
  </Location>

  PerlModule ModPerl::P1
  <Location /P1>
     SetHandler perl-script
     PerlHandler ModPerl::P1
#    PerlSendHeader On
      PerlOptions +ParseHeaders
  </Location>
  PerlModule Apache::DBI
  PerlFixupHandler Apache::SIG  
  LogFormat "%h %l %u %t \"%r\" %s %b %{SIGPIPE}e"
</IfModule>

###############################################################
# PageKit setup  TAPEMON_HOME TAPEMON_LIB
PassEnv ORACLE_HOME ORACLE_SID ORACLE_USERID 

<Perl>
    use mod_perl2;

    # It is not necasary to preload this modules, but it helps
    # to find errors in your instalation.

    use Apache2::URI ();
    use Apache2::Cookie ();
    use Apache2::Request ();
    use Apache::SessionX ();
    use Apache2::Util ();
    use Compress::Zlib ();
    use File::Find ();
    use HTML::FillInForm ();
    use HTML::Parser ();
    use HTML::Template ();
    use XML::LibXML ();

    use Apache2::PageKit();
    use lib "/dso/dsoapps/iesdev/qtngsas70/DSOMP/lib";
</Perl>


SetHandler perl-script
PerlSetVar PKIT_ROOT /dso/dsoapps/iesdev/qtngsas70/DSOMP/www
PerlSetVar PKIT_SERVER test
PerlHandler +Apache2::PageKit
<Perl>
        Apache2::PageKit->startup('/dso/dsoapps/iesdev/qtngsas70/DSOMP/www', 'test');
</Perl>

PerlInitHandler +Apache2::Reload
# Error Handling
PerlModule Apache2::ErrorReport
PerlSetVar ErrorReportHandler display

我应该知道如何解决这个问题吗?

谢谢

Shanmugam A.

EN

回答 1

Stack Overflow用户

发布于 2013-07-11 22:38:10

看起来Apache-PageKit只适用于mod_perl1,而不适用于mod_perl2 (后者将使用Apache2::URI,而不是Apache::URI)。因此,您可能应该寻找替代方案,或者如果您确实需要此模块,那么您必须找到一种方法来在系统上安装Apache1和mod_perl1。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17595679

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档