| View previous topic :: View next topic |
| Author |
Message |
DerBien n00b

Joined: 19 Mar 2004 Posts: 18
|
Posted: Thu Jun 30, 2005 5:50 pm Post subject: [solved] mod_perl & apache2 not working after upgrading |
|
|
net-www/apache-2.0.54-r7
www-apache/mod_perl-1.99.11
dev-lang/perl-5.8.6-r4
After upgrading world earlier today i realized apache no longer works. on startup it compaints:
| Code: | [Thu Jun 30 19:42:16 2005] [error] Can't locate Apache2.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.6/i686- /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686- /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i686- /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.4 . /usr/lib/apache2/ /usr/lib/apache2/lib/perl) at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 1.\nBEGIN failed--compilation aborted at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 1.\nCompilation failed in require at (eval 1) line 1.\n
[Thu Jun 30 19:42:16 2005] [error] Can't load Perl file: /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl for server 213.203.193.254:0, exiting...\n |
When disabling mod_perl it works fine.
I think the upgrade to dev-lang/perl-5.8.6-r4 caused this. However the wired thing is the files are there:
| Code: | imap perl5 # find . -name Apache2.pm
./vendor_perl/5.8.6/i686-linux/Apache2.pm
./vendor_perl/5.8.6/i686-linux/Bundle/Apache2.pm
imap perl5 # qpkg -l mod_perl | grep Apache2.pm
/usr/lib/perl5/vendor_perl/5.8.6/i686-linux/Apache2.pm
/usr/lib/perl5/vendor_perl/5.8.6/i686-linux/Bundle/Apache2.pm
imap perl5 # |
I tried re-installing mod_perl and various other hacks.. nothing seems to work. Perl upgrades on gentoo have a history of breaking various programms, but in the past perl-cleaner could allways fix it. This time running perl-cleaner didnt help.
I feel like im missing something here..
Is anyone else experiencing this?
Regards
Alex
Last edited by DerBien on Sun Dec 25, 2005 4:15 pm; edited 1 time in total |
|
| Back to top |
|
 |
msalerno Veteran


Joined: 17 Dec 2002 Posts: 1336 Location: Sweating in South Florida
|
Posted: Thu Jun 30, 2005 6:09 pm Post subject: |
|
|
You could try adding the following line to /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl
use lib "/usr/lib/perl5/vendor_perl/5.8.6/i686-linux/Bundle";
and/or
use lib "/usr/lib/perl5/vendor_perl/5.8.6/i686-linux/Bundle/Apache2.pm"; _________________ When harmonious relationships dissolve
Then respect and devotion arise;
When a nation falls to chaos
Then loyalty and patriotism are born.
-Lao Tse |
|
| Back to top |
|
 |
DerBien n00b

Joined: 19 Mar 2004 Posts: 18
|
Posted: Thu Jun 30, 2005 6:16 pm Post subject: |
|
|
Hi,
thanks for your suggestion. Unfortunately that didnt help.
Added the suggested lines, restarted apache with -D PERL .. same error. I ended up throwing mod_perl out and switched back to regular CGI. .. which is Slow, but works.
| Code: |
[Thu Jun 30 20:13:22 2005] [error] Can't locate Apache2.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.6/i686- /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686- /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i686- /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.4 . /usr/lib/apache2/ /usr/lib/apache2/lib/perl) at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 1.\nBEGIN failed--compilation aborted at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 1.\nCompilation failed in require at (eval 1) line 1.\n |
|
|
| Back to top |
|
 |
msalerno Veteran


Joined: 17 Dec 2002 Posts: 1336 Location: Sweating in South Florida
|
Posted: Thu Jun 30, 2005 7:08 pm Post subject: |
|
|
That seems a bit drastic. The issue is that your new perl library path is not being included in the @INC array. You might need to recompile perl again.
If you look at your @INC path, you will see some problems.
| Code: | @INC contains:
/etc/perl
/usr/lib/perl5/site_perl/5.8.6/i686-
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.6/i686-
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl/5.8.4
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.6/i686-
/usr/lib/perl5/5.8.6
/usr/local/lib/site_perl
/usr/lib/perl5/site_perl/5.8.4
.
/usr/lib/apache2/
/usr/lib/apache2/lib/perl |
Compared to mine:
| Code: | @INC:
/etc/perl
/usr/lib/perl5/site_perl/5.8.6/i686-linux
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl/5.8.5/i686-linux
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.6/i686-linux
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl/5.8.5/i686-linux
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.6/i686-linux
/usr/lib/perl5/5.8.6
/usr/local/lib/site_perl
/usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl/5.8.5/i686-linux |
Check out @INC paths don't need to be the same, but does the directory "/usr/lib/perl5/site_perl/5.8.6/i686-" really exist? Strange, but you seem to be missing "linux" in your path, your perl install might have gotten borked.
Check your @INC path with the output of: perl -V _________________ When harmonious relationships dissolve
Then respect and devotion arise;
When a nation falls to chaos
Then loyalty and patriotism are born.
-Lao Tse |
|
| Back to top |
|
 |
DerBien n00b

Joined: 19 Mar 2004 Posts: 18
|
Posted: Thu Jun 30, 2005 7:39 pm Post subject: |
|
|
The output i was showing earlier came from apache logfile. Its probably been truncated. This below is from perl -V. As shown the directory is ok.
| Code: | Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under linux
Compiled at Jun 30 2005 05:23:34
@INC:
/etc/perl
/usr/lib/perl5/site_perl/5.8.6/i686-linux
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.6/i686-linux
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.4
/usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl/5.8.5/i686-linux
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.6/i686-linux
/usr/lib/perl5/5.8.6
/usr/local/lib/site_perl
/usr/lib/perl5/site_perl/5.8.4
. |
Regards
Alex |
|
| Back to top |
|
 |
mxc Guru


Joined: 05 Mar 2003 Posts: 442 Location: South Africa
|
Posted: Thu Jul 07, 2005 6:00 am Post subject: |
|
|
I have got the same problem. I know very little about perl so dont know where to look. Any progress on your side? BTW I had to copy the mod_perl config files from /etc/apache/conf/modules.d/ to the new spot /etc/apache/modules.d. I edited the 75_mod_perl file to point to the correct location for the perl startup script.
I get the same error in my log file as above
| Quote: | [Thu Jul 07 07:51:56 2005] [error] Can't locate Apache2.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5/i686-linux /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.5/i686-linux /usr/lib/perl5/site_perl/5.8.5 . /usr/lib/apache2) at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line 1.\nBEGIN failed--compilation aborted at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line 1.\nCompilation failed in require at (eval 2) line 1.\n
[Thu Jul 07 07:51:56 2005] [error] Can't load Perl file: /etc/apache2/modules.d/apache2-mod_perl-startup.pl for server localhost.localdomain:0, exiting...
|
I even tried emerging the masked mod_perl-2.0.0 but it made no difference _________________ http://www.CyberDesigns.co.za
http://www.Jumpingbean.co.za |
|
| Back to top |
|
 |
DerBien n00b

Joined: 19 Mar 2004 Posts: 18
|
Posted: Thu Jul 07, 2005 6:39 am Post subject: |
|
|
I havent changed anything since i disabled mod_perl. However i found this note on the otrs.org website, in the changelog for the new upcoming 2.0 release
| Quote: | | removed CGI cpan module from dist because of incomapt. for mod_perl 1.99 and mod_perl 2.00 |
I dont know if its related to our problem, and chances are im not going to try it out but maybe it helps someone else to look in the right direction.
I also know very little about perl so i dont feeld like re-activating mod_perl again.
Regards
Alex |
|
| Back to top |
|
 |
LordArthas Guru


Joined: 01 Nov 2004 Posts: 493 Location: Maniago, Friûl, Italia
|
Posted: Mon Jul 11, 2005 2:22 pm Post subject: |
|
|
Hi all!
After fixing the usual broken path, I had the same problems as you about Apache2.pm (I'm using mod_perl-2.0.0 ebuild). I fixing by editing the startup script. There is a new one attached to this bug.
Unfortunately, it still doesn't work. When I start Apache it takes forever and then fails, sometimes it just hangs there and Apache doesn't load. At this point I'm giving up as this ebuild seems to be doomed. I'll wait for the next one.
Michele.. |
|
| Back to top |
|
 |
gcasillo l33t


Joined: 23 Sep 2003 Posts: 713 Location: Cincinnati, Ohio, USA
|
Posted: Fri Jul 15, 2005 9:59 pm Post subject: |
|
|
| The mod_perl-2.0.0 ebuild has been fux0red for a couple months now despite several bug reports. |
|
| Back to top |
|
 |
LordArthas Guru


Joined: 01 Nov 2004 Posts: 493 Location: Maniago, Friûl, Italia
|
Posted: Sat Jul 16, 2005 6:38 am Post subject: |
|
|
Hi!
I'm reverting to mod_fastcgi for now, which ain't exactly the same thing but - hey - Catalyst works well with it!
michele |
|
| Back to top |
|
 |
snIP3r l33t

Joined: 21 May 2004 Posts: 770 Location: germany
|
Posted: Thu Jul 28, 2005 7:22 pm Post subject: |
|
|
same problem here:
[Thu Jul 28 21:19:02 2005] [error] Can't locate ModPerl/Util.pm in @INC (@INC contains: /home/httpd/perl /etc/perl /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl . /usr/lib/apache2/ /usr/lib/apache2/lib/perl) at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 8.\nBEGIN failed--compilation aborted at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 8.\nCompilation failed in require at (eval 1) line 1.\n
[Thu Jul 28 21:19:02 2005] [error] Can't load Perl file: /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl for server localhost:0, exiting...\n
only diabling mod_perl made apache2 up and running....
wating for a bugfix...
greets
snIPer _________________ AMD X2 4450e on ASUS M2N-SLI Deluxe
Gentoo Base System 2.0.2
Kernel 2.6.36-gentoo-r5 SMP x86_64
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic! |
|
| Back to top |
|
 |
LordArthas Guru


Joined: 01 Nov 2004 Posts: 493 Location: Maniago, Friûl, Italia
|
Posted: Fri Jul 29, 2005 4:22 pm Post subject: |
|
|
Hi!
It seem we have mod_perl 2.0.1 now in portage. However I still have to test it, as I'm quite happy with mod_fastcgi right now. I might do that in the next days.
Michele. |
|
| Back to top |
|
 |
Survey n00b

Joined: 03 Aug 2005 Posts: 2
|
Posted: Wed Aug 03, 2005 11:33 pm Post subject: |
|
|
I'm about to install mod_perl also, im just wondering how come i dont get the latest package when i do a
emerge --search mod_perl ..i get
| Code: | * www-apache/mod_perl
Latest version available: 1.27-r4
Latest version installed: [ Not Installed ]
Size of downloaded files: 363 kB
Homepage: http://perl.apache.org
Description: A Perl Module for Apache
License: Apache-1.1 as-is |
I have latest apache 2.0.54-r8 installed and no earlier versions installed. Since i see you guys get later versions thru the portage i'm just wondering if anyone knows what can be wrong?
edit: Oh yes, it's recently synced if anyone wonders. |
|
| Back to top |
|
 |
DerBien n00b

Joined: 19 Mar 2004 Posts: 18
|
Posted: Thu Aug 04, 2005 6:15 am Post subject: |
|
|
Hi,
the latest versions of mod_perl are in portage, but masked by keyword ~x86. to install them anyways you gotta: echo "www-apache/mod_perl ~x86" >> /etc/portage/package.keywords
then emerge again. As far as i know mod_perl2 will also require you to do the same for the latest apache build which is a dep, but also masked currently.
cheers
alex |
|
| Back to top |
|
 |
Survey n00b

Joined: 03 Aug 2005 Posts: 2
|
Posted: Thu Aug 04, 2005 2:10 pm Post subject: |
|
|
| Thanx alot for the reply, worked great. Makes me think if there's a way to unmask all of them? Since alot of those packages seem to depend on other masked packages, rather timeconsuming to "echo" them all. |
|
| Back to top |
|
 |
tradenet n00b

Joined: 31 Jan 2004 Posts: 49
|
Posted: Sat Aug 06, 2005 5:40 pm Post subject: |
|
|
I'm getting the same with 1.99.11
That error comes about when you try to load:
apache2-mod_perl-startup.pl
Anybody try v 2.0.1-r1 yet.
I'd like to try it, but it needs a whole bunch of stuff:
| Quote: |
ACCEPT_KEYWORDS="~amd64" emerge -pv ">=www-apache/mod_perl-2.0.1-r1"
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] net-www/gentoo-webroot-default-0.2 -no-htdocs 64 kB
[ebuild N ] dev-libs/apr-0.9.6-r3 +ipv6 1,001 kB
[ebuild N ] app-misc/mime-types-3 5 kB
[ebuild N ] dev-libs/apr-util-0.9.6-r2 +berkdb +gdbm -ldap 707 kB
[ebuild U ] net-www/apache-2.0.54-r13 [2.0.54-r8] +apache2 -debug -doc -ldap -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool -mpm-worker -no-suexec (-selinux) +ssl -static-modules -threads 49 kB
[ebuild U ] perl-core/CGI-3.10 [3.05] 220 kB
[ebuild U ] www-apache/mod_perl-2.0.1-r1 [1.99.11] 3,607 kB
|
| snIP3r wrote: | same problem here:
[Thu Jul 28 21:19:02 2005] [error] Can't locate ModPerl/Util.pm in @INC (@INC contains: /home/httpd/perl /etc/perl /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i686-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl . /usr/lib/apache2/ /usr/lib/apache2/lib/perl) at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 8.\nBEGIN failed--compilation aborted at /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl line 8.\nCompilation failed in require at (eval 1) line 1.\n
[Thu Jul 28 21:19:02 2005] [error] Can't load Perl file: /etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl for server localhost:0, exiting...\n
only diabling mod_perl made apache2 up and running....
wating for a bugfix...
greets
snIPer |
|
|
| Back to top |
|
 |
jmanning n00b

Joined: 22 Oct 2003 Posts: 27
|
Posted: Wed Aug 10, 2005 5:25 pm Post subject: |
|
|
mod_perl 2.0.1 ebuilds working great here with apache-2.0.54-r8 and Maypole/Catalyst apps. Beware the conf file changes in >=apache-2.0.54-r10.
package.keywords:
www-apache/mod_perl ~x86
www-apache/libapreq2 ~x86
# use these if you want
#net-www/apache ~x86
#net-www/gentoo-webroot-default ~x86
#dev-libs/apr ~x86
#dev-libs/apr-util ~x86
The missing Apache2.pm on mod_perl version 2.0 and greater is due to an API change. There's probably a new startup.pl file somewhere that doesn't try to use Apache2.
If you have custom code or startup scripts, you definitely have to change everything to work with the final API.
See: http://perl.apache.org/docs/2.0/rename.html
It was a big change, very late in the 2.0 dev cycle. It broke many things, kinda controversial. But, that's why its the dev version! They promise a stable API from here on (at least until 3.0).
Also, after running perl-cleaner, go into /usr/lib/perl5/vendor_perl/[old-perl-version] and re-emerge anything left - then delete the directory. Make a list of anything you installed manually (ie from CPAN) and whatever you find in /usr/lib/perl5/site_perl/[old-perl-versions]. Then purge the old lib directories entirely, and reinstall everything - g-cpan works well and plays nice with portage packages, but straight CPAN does the job too.
~J |
|
| Back to top |
|
 |
biggyL Tux's lil' helper

Joined: 31 Jan 2005 Posts: 120 Location: Israel
|
Posted: Sun Dec 25, 2005 1:18 pm Post subject: |
|
|
Hello All,
I had the same problem with apache2 and mod_perl:
[Sun Dec 25 14:39:27 2005] [error] Can't locate lib.pm in @INC (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.6/i386-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i386-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.6/i386-linux /usr/lib/perl5/5.8.6 /usr/local/lib/site_perl . /usr/lib/apache2) at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line 1.\nBEGIN failed--compilation aborted at /etc/apache2/modules.d/apache2-mod_perl-startup.pl line 1.\nCompilation failed in require at (eval 2) line 1.\n
[Sun Dec 25 14:39:27 2005] [error] Can't load Perl file: /etc/apache2/modules.d/apache2-mod_perl-startup.pl for server vod.edu.haifa.ac.il:0, exiting...
Solved it the following way:
| Code: |
# perl-cleaner reallyall
# emerge libperl
|
Apache starts now without any error.
It seems that this (libperl) package should be installed as a dependency package. |
|
| Back to top |
|
 |
thomash n00b

Joined: 25 Oct 2003 Posts: 14
|
Posted: Sun Feb 12, 2006 9:32 pm Post subject: |
|
|
jmanning, i'm having some config problems witrh apache, mod_perl and catalyst.
Is it possible to have a look at your config files? |
|
| Back to top |
|
 |
Jimboscott n00b

Joined: 19 May 2004 Posts: 22 Location: CH-Lausanne
|
Posted: Wed Oct 29, 2008 8:25 am Post subject: |
|
|
| perl-cleaner worked for me but it's could take a lot of time... |
|
| Back to top |
|
 |
|