You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by U n d e r a c h i e v e r <ta...@rocketmail.com> on 2001/09/15 21:25:29 UTC

Apache.pm fails to load...

Hi

I'm making a fresh build of Apache on Solaris 8 with mod_perl and
mod_ssl.
                                                         
When I load apache i get
Apache.pm failed to load!
in the error log and the application bombs out.

adding
PerlModule Apache
to the top of my httpd.conf also results in failed apache load, this
time with a slightly more descriptive error:

Syntax error on line 48 of /etc/apache/httpd.conf: 
Can't locate Apache.pm in @INC (@INC contains:
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .
usr/local/apache/ /usr/local/apache/lib/perl) at (eval 2) line 3.

/usr/local/apache/bin/apachectl start: httpd could not be started

so i'm guessing this is a paths issue. a look for Apache.pm reveals
three:

find / -name Apache.pm
~/mod_perl-1.26/lib/Bundle/Apache.pm
~/mod_perl-1.26/Apache/Apache.pm
/usr/perl5/5.00503/CGI/Apache.
                                                                       
      
which one of these should i be moving or symlinking to the @INC path?
or is this the wrong approach?

Thanks in advance
                                                                 
PS Here's details of how i undertook the build in case that's relevant:

cd ~
export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin \
:/usr/share/lib:/export/home/opt/SUNWspro/bin:/usr/xpg4/bin \
:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb: \
/usr/local/acrobat4/bin

cd openssl-0.9.6b
./config
make
make test
make install
cd ..
cd mod_perl-1.26/
perl Makefile.PL \
  APACHE_PREFIX=/usr/local/apache \
  APACHE_SRC=../apache_1.3.20/src \
  USE_APACI=1
cd ..
cd mod_ssl-2.8.4-1.3.20
./configure --with-apache=../apache_1.3.20 \
  --prefix=/usr/local/apache \
  --with-ssl=../openssl-0.9.6b \
  --activate-module=src/modules/perl/libperl.a
cd ..
cd apache_1.3.20
SSL_BASE=../openssl-0.9.6b CC="cc" ./configure \
          --prefix=/usr/local/apache           \
          --sysconfdir=/etc/apache             \
          --datadir=/export/home/httpd         \
          --logfiledir=/var/log/httpd          \
          --runtimedir=/var/log/httpd          \
          --enable-module=ssl                  \
          --activate-module=src/modules/perl/libperl.a \
          --disable-rule=EXPAT                 \
          --enable-module=perl \
make
make certificate
sudo make install


=====
u n d e r a c h i e v e r (and proud)
<ta...@rocketmail.com>

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Can't build (was Re: Apache.pm fails to load...)

Posted by Mithun Bhattacharya <mi...@egurucool.com>.
> > find / -name libssl.so.0
> > /usr/local/ssl/lib/libssl.so.0

That seems like a nonstandard library path. Is it there in
/etc/ld.so.conf and even if it is did you run ldconfig after adding it
there ??




Mithun

Re: Can't build (was Re: Apache.pm fails to load...)

Posted by U n d e r a c h i e v e r <ta...@rocketmail.com>.
--- Stas Bekman <st...@stason.org> wrote:
> U n d e r a c h i e v e r wrote:
> >>>what do you see when you do:
> >>>
> >>>ls -l /usr/local/ssl/lib/libssl.so.0
> >>>
> >
> > -rw-r--r--   1 bin      bin       844468 Oct 29  2000
> > /usr/local/ssl/lib/libssl.so.0
> >
> > so mine's not a symlink nor an executable...
>
>
> that's a weird thing, did you install openssl from src or got it in
> the
> binary form?
> have you tried to set the +x bit?
i may have had a binary installation of openssl on the system some time
ago, but the source of the latest version has been compiled and
installed since before trying to get mod_perl going. i'm going to leave
this aside for the time being, return to getting the other components
built and then try again as a DSO as others have suggested...
thanks to everyone for prompt and helpful responses. i'll be posting
again shortly if i can't get it going ...


=====
u n d e r a c h i e v e r (and proud)
<ta...@rocketmail.com>

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Can't build (was Re: Apache.pm fails to load...)

Posted by Stas Bekman <st...@stason.org>.
U n d e r a c h i e v e r wrote:

>>>>a search for libssl reveals:
>>>>
>>>>find / -name libssl.so.0
>>>>/usr/local/ssl/lib/libssl.so.0
>>>>
> 
>>>what do you see when you do:
>>>
>>>ls -l /usr/local/ssl/lib/libssl.so.0
>>>
> 
> -rw-r--r--   1 bin      bin       844468 Oct 29  2000
> /usr/local/ssl/lib/libssl.so.0
> 
> so mine's not a symlink nor an executable...


that's a weird thing, did you install openssl from src or got it in the 
binary form?
have you tried to set the +x bit?


>>or your /etc/ld.so.conf doesn't have /usr/local/ssl/lib.
>>
> 
> indeed, i do not /have/ an ld.so.conf ... the closest match seems to be
> an ld.so.1 in /etc/lib, but that's a binary  :)
> i also don't have an ldconfig executable


no, no. it shouldn't be there. That's why you tell the configure code 
where to find the library. It uses this path during the linking stage 
and for finding header files.

 
> ssh has been compiled and happily running against this version of
> openssl for a couple of weeks. I've re-made and re-installed openssl
> (windows habits die hard) before posting this message, but the whole
> build still fails in exactly the same way as previously reported.
> 
> when i build apache directly (that is to say running configure and make
> in the ./apache_XXXX directory, as opposed to in mod_perl) it does not
> stall on a missing ssl library, and happily compiles with mod_ssl.

weirdo, it fails to open the file, so how about trying to use strace(1) 
or similar and see what it actually tries to open? log the output into a 
file and then look there.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Can't build (was Re: Apache.pm fails to load...)

Posted by U n d e r a c h i e v e r <ta...@rocketmail.com>.
> > > a search for libssl reveals:
> > > 
> > > find / -name libssl.so.0
> > > /usr/local/ssl/lib/libssl.so.0

> > what do you see when you do:
> > 
> > ls -l /usr/local/ssl/lib/libssl.so.0

-rw-r--r--   1 bin      bin       844468 Oct 29  2000
/usr/local/ssl/lib/libssl.so.0

so mine's not a symlink nor an executable...

> or your /etc/ld.so.conf doesn't have /usr/local/ssl/lib.

indeed, i do not /have/ an ld.so.conf ... the closest match seems to be
an ld.so.1 in /etc/lib, but that's a binary  :)
i also don't have an ldconfig executable

ssh has been compiled and happily running against this version of
openssl for a couple of weeks. I've re-made and re-installed openssl
(windows habits die hard) before posting this message, but the whole
build still fails in exactly the same way as previously reported.

when i build apache directly (that is to say running configure and make
in the ./apache_XXXX directory, as opposed to in mod_perl) it does not
stall on a missing ssl library, and happily compiles with mod_ssl.



=====
u n d e r a c h i e v e r (and proud)
<ta...@rocketmail.com>

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Can't build (was Re: Apache.pm fails to load...)

Posted by "Philippe M . Chiasson" <go...@cpan.org>.
On Mon, Sep 17, 2001 at 08:02:02PM +0800, Stas Bekman wrote:
> U n d e r a c h i e v e r wrote:
> 
> > --- Stas Bekman <st...@stason.org> wrote:
> > 
> >>mod_perl guide is your friend:
> >>
> >>
> >>
> > http://perl.apache.org/guide/install.html#mod_perl_and_mod_ssl_openssl
> > 
> > thanks for the tip, but that doesn't work for me. following the
> > instructions on the page, i find i get the following errors after the
> > 'make' in 'mod_perl'. here's the error:-
> > 
> > ld.so.1: ./gen_test_char: fatal: libssl.so.0: open failed: No such file
> > or dire
> > *** Error code 137
> > make: Fatal error: Command failed for target Test_char.h'
> > Current working directory /export/home/gary/apache_1.3.20/src/main
> > *** Error code 1
> > make: Fatal error: Command failed for target Subdirs'
> > Current working directory /export/home/gary/apache_1.3.20/src
> > *** Error code 1
> > make: Fatal error: Command failed for target Build-std'
> > Current working directory /export/home/gary/apache_1.3.20
> > *** Error code 1
> > make: Fatal error: Command failed for target Build'
> > Current working directory /export/home/gary/apache_1.3.20
> > *** Error code 1
> > make: Fatal error: Command failed for target Apaci_httpd'
> > 
> > here's the instructions executed:-
> > 
> > export
> > PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/export
> > cd openssl-0.9.6b/
> > ./config
> > make && make test && make install
> > cd ..
> > cd mod_ssl-2.8.4-1.3.20/
> > ./configure --with-apache=../apache_1.3.20/
> > cd ..
> > cd mod_perl-1.26/
> > perl Makefile.PL USE_APACI=1 EVERYTHING=1 DO_HTTPD=1 \
> >                  SSL_BASE=/usr/local/ssl             \
> >                  APACHE_PREFIX=/usr/local/apachessl  \
> >                  APACHE_SRC=../apache_1.3.20/src     \
> >                  APACI_ARGS='--enable-module=ssl
> > --enable-module=rewrite'
> > make
> > 
> > a search for libssl reveals:
> > 
> > find / -name libssl.so.0
> > /usr/local/ssl/lib/libssl.so.0
> > 
> > can anyone help out at this stage? thanks very
> 
> what do you see when you do:
> 
> ls -l /usr/local/ssl/lib/libssl.so.0
> 
> For example on my machine I get:
> 
> /home/stas> ls -l /usr/lib/libssl.so.0
> 
> lrwxrwxrwx    1 root     root           15 Sep 14 23:36 /usr/lib/libssl.so.0 -> libssl.so.0.9.6
> 
> Does the symlink point correctly to the real libssl.so?

or your /etc/ld.so.conf doesn't have /usr/local/ssl/lib.  

In wich case, add it to ld.so.conf and run ldconfig as root

> -- 
> 
> 
> _____________________________________________________________________
> Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
> http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
> mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
> 
> 

-- 
Philippe M. Chiasson  <go...@cpan.org>
  Extropia's Resident System Guru
     http://www.eXtropia.com/

Just because something is obviously happening doesn't mean
something obvious is happening. 
	-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/&&print||$$++&&redo}'

Re: Can't build (was Re: Apache.pm fails to load...)

Posted by Stas Bekman <st...@stason.org>.
U n d e r a c h i e v e r wrote:

> --- Stas Bekman <st...@stason.org> wrote:
> 
>>mod_perl guide is your friend:
>>
>>
>>
> http://perl.apache.org/guide/install.html#mod_perl_and_mod_ssl_openssl
> 
> thanks for the tip, but that doesn't work for me. following the
> instructions on the page, i find i get the following errors after the
> 'make' in 'mod_perl'. here's the error:-
> 
> ld.so.1: ./gen_test_char: fatal: libssl.so.0: open failed: No such file
> or dire
> *** Error code 137
> make: Fatal error: Command failed for target Test_char.h'
> Current working directory /export/home/gary/apache_1.3.20/src/main
> *** Error code 1
> make: Fatal error: Command failed for target Subdirs'
> Current working directory /export/home/gary/apache_1.3.20/src
> *** Error code 1
> make: Fatal error: Command failed for target Build-std'
> Current working directory /export/home/gary/apache_1.3.20
> *** Error code 1
> make: Fatal error: Command failed for target Build'
> Current working directory /export/home/gary/apache_1.3.20
> *** Error code 1
> make: Fatal error: Command failed for target Apaci_httpd'
> 
> here's the instructions executed:-
> 
> export
> PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/export
> cd openssl-0.9.6b/
> ./config
> make && make test && make install
> cd ..
> cd mod_ssl-2.8.4-1.3.20/
> ./configure --with-apache=../apache_1.3.20/
> cd ..
> cd mod_perl-1.26/
> perl Makefile.PL USE_APACI=1 EVERYTHING=1 DO_HTTPD=1 \
>                  SSL_BASE=/usr/local/ssl             \
>                  APACHE_PREFIX=/usr/local/apachessl  \
>                  APACHE_SRC=../apache_1.3.20/src     \
>                  APACI_ARGS='--enable-module=ssl
> --enable-module=rewrite'
> make
> 
> a search for libssl reveals:
> 
> find / -name libssl.so.0
> /usr/local/ssl/lib/libssl.so.0
> 
> can anyone help out at this stage? thanks very

what do you see when you do:

ls -l /usr/local/ssl/lib/libssl.so.0

For example on my machine I get:

/home/stas> ls -l /usr/lib/libssl.so.0

lrwxrwxrwx    1 root     root           15 Sep 14 23:36 /usr/lib/libssl.so.0 -> libssl.so.0.9.6

Does the symlink point correctly to the real libssl.so?

-- 


_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



Can't build (was Re: Apache.pm fails to load...)

Posted by U n d e r a c h i e v e r <ta...@rocketmail.com>.
--- Stas Bekman <st...@stason.org> wrote:
> mod_perl guide is your friend:
> 
>
http://perl.apache.org/guide/install.html#mod_perl_and_mod_ssl_openssl

thanks for the tip, but that doesn't work for me. following the
instructions on the page, i find i get the following errors after the
'make' in 'mod_perl'. here's the error:-

ld.so.1: ./gen_test_char: fatal: libssl.so.0: open failed: No such file
or dire
*** Error code 137
make: Fatal error: Command failed for target Test_char.h'
Current working directory /export/home/gary/apache_1.3.20/src/main
*** Error code 1
make: Fatal error: Command failed for target Subdirs'
Current working directory /export/home/gary/apache_1.3.20/src
*** Error code 1
make: Fatal error: Command failed for target Build-std'
Current working directory /export/home/gary/apache_1.3.20
*** Error code 1
make: Fatal error: Command failed for target Build'
Current working directory /export/home/gary/apache_1.3.20
*** Error code 1
make: Fatal error: Command failed for target Apaci_httpd'

here's the instructions executed:-

export
PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/export
cd openssl-0.9.6b/
./config
make && make test && make install
cd ..
cd mod_ssl-2.8.4-1.3.20/
./configure --with-apache=../apache_1.3.20/
cd ..
cd mod_perl-1.26/
perl Makefile.PL USE_APACI=1 EVERYTHING=1 DO_HTTPD=1 \
                 SSL_BASE=/usr/local/ssl             \
                 APACHE_PREFIX=/usr/local/apachessl  \
                 APACHE_SRC=../apache_1.3.20/src     \
                 APACI_ARGS='--enable-module=ssl
--enable-module=rewrite'
make

a search for libssl reveals:

find / -name libssl.so.0
/usr/local/ssl/lib/libssl.so.0

can anyone help out at this stage? thanks very



=====
u n d e r a c h i e v e r (and proud)
<ta...@rocketmail.com>

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Apache.pm fails to load...

Posted by Stas Bekman <st...@stason.org>.
On Sat, 15 Sep 2001, U n d e r a c h i e v e r wrote:

> Hi
>
> I'm making a fresh build of Apache on Solaris 8 with mod_perl and
> mod_ssl.
>
> When I load apache i get
> Apache.pm failed to load!
> in the error log and the application bombs out.

mod_perl guide is your friend:

http://perl.apache.org/guide/install.html#mod_perl_and_mod_ssl_openssl_

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/