Can't locate Plack/Handler/Apache2.pm

Hi all,
I am trying to install RT 4.0.5 con a Centos 5
Have gone through all the install steps (even the perl cpan stuff…)
and build the database under Mysql.
Now I have created a file in /etc/httpd/conf.d/rt.conf with the
following stuff

# Optional apache logs for RT # ErrorLog /opt/rt4/var/log/apache2.error # TransferLog /opt/rt4/var/log/apache2.access # LogLevel debug
           AddDefaultCharset UTF-8
           DocumentRoot "/opt/rt4/share/html"

           <Location />
               Order allow,deny
               Allow from all

               SetHandler modperl
               PerlResponseHandler Plack::Handler::Apache2
               PerlSetVar psgi_app /opt/rt4/sbin/rt-server
           </Location>
           <Perl>
               use Plack::Handler::Apache2;
               Plack::Handler::Apache2->preload("/opt/rt4/sbin/rt-server");
           </Perl>

But upon restarting apache i get this error

Can’t locate Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted\t(in cleanup) Can’t locate
Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted at /etc/httpd/conf.d/rt.conf line 11.\n

The point is that I installed perl version 5.14 and compiled rt eith
that also installed the modules under that version. But I do not know
why seems that apache or whatever has the old path.
Tried to modify (even copy) the path contents to old locations but more
errors rise…

Can you help me?

The following is from a perl guy perspective (I’m no expert with RT). I
don’t remember what options are available during build and install, but in
the source files it looks like /usr/bin/perl is hardcoded. So unless there
is a simpler way I don’t know about, you would need to change them to point
to /usr/local/bin/perl (or whatever path you’ve installed the new perl on).

The files that call /usr/bin/perl within my RT installation are:
./bin/rt-mailgate
./bin/importusers.pl
./bin/rt
./bin/rt-crontool
./sbin/rt-email-group-admin
./sbin/rt-server
./sbin/rt-setup-database
./sbin/rt-setup-fulltext-index
./sbin/rt-shredder
./sbin/rt-attributes-viewer
./sbin/rt-email-dashboards
./sbin/rt-session-viewer
./sbin/standalone_httpd
./sbin/rt-preferences-viewer
./sbin/rt-server.fcgi
./sbin/rt-clean-sessions
./sbin/rt-test-dependencies
./sbin/rt-dump-metadata
./sbin/rt-validator
./sbin/rt-fulltext-indexer
./sbin/rt-email-digest

As I mentioned in a previous post, it’s a bad idea to mix your perl
environments, so you may want, at a minimum, to ‘yum reinstall perl’ so
that your distro perl doesn’t cause you headaches later.

Regards,

Stephen J Alexander
MPBX, LLC
http://mpbx.com
832-713-6729On Mon, Apr 23, 2012 at 6:19 AM, Jacobo Urdiales jacobo.urdiales@cekon.eswrote:

Hi all,
I am trying to install RT 4.0.5 con a Centos 5
Have gone through all the install steps (even the perl cpan stuff…) and
build the database under Mysql.
Now I have created a file in /etc/httpd/conf.d/rt.conf with the following
stuff

# Optional apache logs for RT # ErrorLog /opt/rt4/var/log/apache2.error # TransferLog /opt/rt4/var/log/apache2.**access # LogLevel debug
         AddDefaultCharset UTF-8
         DocumentRoot "/opt/rt4/share/html"

         <Location />
             Order allow,deny
             Allow from all

             SetHandler modperl
             PerlResponseHandler Plack::Handler::Apache2
             PerlSetVar psgi_app /opt/rt4/sbin/rt-server
         </Location>
         <Perl>
             use Plack::Handler::Apache2;
             Plack::Handler::Apache2->**preload("/opt/rt4/sbin/rt-**

server");

But upon restarting apache i get this error

Can’t locate Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.**8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.**8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.**8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-**linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted\t(in cleanup) Can’t locate
Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.**8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.**8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.**8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-**linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted at /etc/httpd/conf.d/rt.conf line 11.\n

The point is that I installed perl version 5.14 and compiled rt eith that
also installed the modules under that version. But I do not know why seems
that apache or whatever has the old path.
Tried to modify (even copy) the path contents to old locations but more
errors rise…

Can you help me?

But upon restarting apache i get this error

Can’t locate Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted\t(in cleanup) Can’t locate
Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted at /etc/httpd/conf.d/rt.conf line 11.\n

The point is that I installed perl version 5.14 and compiled rt eith
that also installed the modules under that version. But I do not
know why seems that apache or whatever has the old path.
Tried to modify (even copy) the path contents to old locations but
more errors rise…

Did you compile apache/mod_perl with 5.14 or are you using vendor
packages that still point to the 5.8 install?

If you want to use your own perl build, fastcgi will be easier.

-kevin

Hi Kevin,
Actually on centos5 perl 5.8.8 is installed using yum. But there is a
cpan library with is not working with versions older than 5.10 so i had
to download and compile 5.14.

So after the cpan and dependancies nightmare not sure if any package is
still pointing to the old perl…

The system is going to have just 30 requests a month or so. So I do not
think using cgi would be a problem.

Can you tell me what to touch or move to use it?

Regards,

Jacobo

PD: Thanks for your help!

El 23/04/12 16:30, Kevin Falcone escribi�:> On Mon, Apr 23, 2012 at 01:19:09PM +0200, Jacobo Urdiales wrote:

But upon restarting apache i get this error

Can’t locate Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted\t(in cleanup) Can’t locate
Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted at /etc/httpd/conf.d/rt.conf line 11.\n

The point is that I installed perl version 5.14 and compiled rt eith
that also installed the modules under that version. But I do not
know why seems that apache or whatever has the old path.
Tried to modify (even copy) the path contents to old locations but
more errors rise…
Did you compile apache/mod_perl with 5.14 or are you using vendor
packages that still point to the 5.8 install?

If you want to use your own perl build, fastcgi will be easier.

-kevin

Actually on centos5 perl 5.8.8 is installed using yum. But there is
a cpan library with is not working with versions older than 5.10 so
i had to download and compile 5.14.

RT should install just fine against 5.8.8, but obviously a newer perl
is nicer to have an easier to maintain.

So after the cpan and dependancies nightmare not sure if any package
is still pointing to the old perl…

mod_perl is compiled into apache and judging from your error messages
is clearly pointing to 5.8.8

The system is going to have just 30 requests a month or so. So I do
not think using cgi would be a problem.

fastcgi, not cgi.
You can read about the two fastcgi solutions (mod_fastcgi and
mod_fcgid) in docs/web_deployment.pod

-kevin> El 23/04/12 16:30, Kevin Falcone escribió:

On Mon, Apr 23, 2012 at 01:19:09PM +0200, Jacobo Urdiales wrote:

But upon restarting apache i get this error

Can’t locate Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted\t(in cleanup) Can’t locate
Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted at /etc/httpd/conf.d/rt.conf line 11.\n

The point is that I installed perl version 5.14 and compiled rt eith
that also installed the modules under that version. But I do not
know why seems that apache or whatever has the old path.
Tried to modify (even copy) the path contents to old locations but
more errors rise…
Did you compile apache/mod_perl with 5.14 or are you using vendor
packages that still point to the 5.8 install?

If you want to use your own perl build, fastcgi will be easier.

-kevin

Hi Kevin,
Just build a new Centos5.
Followed the install process and came to a problem using perl 5.8.8
component HTML::TextWrapper has to be manually intalled on cpan because
of two dependancies.
component Text::Wrapper fails because of perl version

here it is maybe to update requirements or documentation…

cpan> install Text::Wrapper
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Mon, 23 Apr 2012 13:39:03 GMT
Running install for module Text::Wrapper
Running make for C/CJ/CJM/Text-Wrapper-1.03.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for
/root/.cpan/sources/authors/id/C/CJ/CJM/Text-Wrapper-1.03.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Text-Wrapper-1.03/
Text-Wrapper-1.03/README
Text-Wrapper-1.03/Changes
Text-Wrapper-1.03/LICENSE
Text-Wrapper-1.03/MANIFEST
Text-Wrapper-1.03/META.yml
Text-Wrapper-1.03/META.json
Text-Wrapper-1.03/t/
Text-Wrapper-1.03/t/00-load.t
Text-Wrapper-1.03/t/20-unicode.t
Text-Wrapper-1.03/t/10-wrapper.t
Text-Wrapper-1.03/t/00-all_prereqs.t
Text-Wrapper-1.03/t/release-pod-syntax.t
Text-Wrapper-1.03/t/release-pod-coverage.t
Text-Wrapper-1.03/Makefile.PL
Text-Wrapper-1.03/lib/
Text-Wrapper-1.03/lib/Text/
Text-Wrapper-1.03/lib/Text/Wrapper.pm
Text-Wrapper-1.03/example/
Text-Wrapper-1.03/example/gettysburg.pl
Removing previously used /root/.cpan/build/Text-Wrapper-1.03

CPAN.pm: Going to build C/CJ/CJM/Text-Wrapper-1.03.tar.gz

Perl v5.10.0 required–this is only v5.8.8, stopped at Makefile.PL line 5.
BEGIN failed–compilation aborted at Makefile.PL line 5.
Running make test
Make had some problems, maybe interrupted? Won’t test
Running make install
Make had some problems, maybe interrupted? Won’t install

cpan>

El 23/04/12 18:03, Kevin Falcone escribi�:> On Mon, Apr 23, 2012 at 04:39:17PM +0200, Jacobo Urdiales wrote:

Actually on centos5 perl 5.8.8 is installed using yum. But there is
a cpan library with is not working with versions older than 5.10 so
i had to download and compile 5.14.
RT should install just fine against 5.8.8, but obviously a newer perl
is nicer to have an easier to maintain.

So after the cpan and dependancies nightmare not sure if any package
is still pointing to the old perl…
mod_perl is compiled into apache and judging from your error messages
is clearly pointing to 5.8.8

The system is going to have just 30 requests a month or so. So I do
not think using cgi would be a problem.
fastcgi, not cgi.
You can read about the two fastcgi solutions (mod_fastcgi and
mod_fcgid) in docs/web_deployment.pod

-kevin

El 23/04/12 16:30, Kevin Falcone escribi�:

On Mon, Apr 23, 2012 at 01:19:09PM +0200, Jacobo Urdiales wrote:

But upon restarting apache i get this error

Can’t locate Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted\t(in cleanup) Can’t locate
Plack/Handler/Apache2.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
/etc/httpd) at /etc/httpd/conf.d/rt.conf line 11.\nBEGIN
failed–compilation aborted at /etc/httpd/conf.d/rt.conf line 11.\n

The point is that I installed perl version 5.14 and compiled rt eith
that also installed the modules under that version. But I do not
know why seems that apache or whatever has the old path.
Tried to modify (even copy) the path contents to old locations but
more errors rise…
Did you compile apache/mod_perl with 5.14 or are you using vendor
packages that still point to the 5.8 install?

If you want to use your own perl build, fastcgi will be easier.

-kevin

Hi all,
Manually downloaded and installed Text::Wrapper version 1.02 from cpan
and dependancies solved

make testdeps

El 23/04/12 22:22, Jacobo Urdiales escribi�:

Removing previously used /root/.cpan/build/Text-Wrapper-1.03

 CPAN.pm: Going to build C/CJ/CJM/Text-Wrapper-1.03.tar.gz

Perl v5.10.0 required–this is only v5.8.8, stopped at Makefile.PL line 5.

Ah, that’s really unfortunate. I wonder why the change, we’ll need to
look into that with the author.

-kevin