cvicente / Netdot

Network Documentation Tool
225 stars 63 forks source link

Can't load Perl module Apache2::Request #141

Open hrtrd opened 6 years ago

hrtrd commented 6 years ago

Attempt to reload DynaLoader.pm aborted.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR.pm line 19.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR.pm line 19.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Pool.pm line 23.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Pool.pm line 23.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request.pm line 26.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request.pm line 26.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request/Param.pm line 27.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request/Param.pm line 27.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/Apache2/Request.pm line 2.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/Apache2/Request.pm line 2.\nCompilation failed in require at (eval 5) line 2.\n [Tue Mar 19 16:38:33.136539 2019] [perl:error] [pid 17272:tid 139626288187264] Can't load Perl module Apache2::Request for server (null):0, exiting... Action 'configtest' failed.

cvicente commented 5 years ago

Looks like you did not properly install that module. What platform are you running Netdot on? For example, in the case of Debian/Ubuntu, you could try:

sudo apt-get install libapache2-request-perl
hrtrd commented 5 years ago

@cvicente Come back, and try install again. Now create new VM, and got error after make apt-install: Ign:2 https://netdot.apt.nsrc.org unstable/ InRelease
Err:6 https://netdot.apt.nsrc.org unstable/ Release
404 Not Found [IP: 128.223.157.64 443] Reading package lists... Done E: The repository 'http://netdot.apt.nsrc.org unstable/ Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

Ubuntu18

hrtrd commented 5 years ago

ubuntu 14.06 and 16.04

W: Failed to fetch http://netdot.apt.nsrc.org/unstable/Sources HttpError404
W: Failed to fetch http://netdot.apt.nsrc.org/unstable/Packages HttpError404 E: Some index files failed to download. They have been ignored, or old ones used instead. There was a problem running apt-get update make: *** [apt-install] Error 25

hanskuhn commented 5 years ago

I updated the httpd configuration to match the documentation. Thanks for reporting.

hrtrd commented 5 years ago

Ubuntu 18

Would you like to continue? [y/n] y Updating package indexes from sources Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Hit:4 https://repo.windscribe.com/ubuntu zesty InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Ign:6 https://netdot.apt.nsrc.org unstable/ InRelease
Get:7 https://netdot.apt.nsrc.org unstable/ Release [1,578 B] Ign:8 https://netdot.apt.nsrc.org unstable/ Release.gpg Reading package lists... Done E: The repository 'http://netdot.apt.nsrc.org unstable/ Release' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. There was a problem running apt-get update Makefile:81: recipe for target 'apt-install' failed make: *** [apt-install] Error 25

candlerb commented 5 years ago

E: The repository 'http://netdot.apt.nsrc.org unstable/ Release' is not signed.

Looks like you'll need to tell apt to accept an unsigned repository. I suggest you try the following:

                my $str = "\n## Added by Netdot install\n".
                    "deb http://netdot.apt.nsrc.org/ unstable/\n".
                    "deb-src http://netdot.apt.nsrc.org/ unstable/\n\n";
                if ( $debian_version =~ /(wheezy|squeeze)/ ){
                    my $target = $1;
                    $str .= "\n".
                        "deb http://netdot.apt.nsrc.org/ $target/\n".
                        "deb-src http://netdot.apt.nsrc.org/ $target/\n\n";
                }

to:

                my $str = "\n## Added by Netdot install\n".
                    "deb [trusted=yes] http://netdot.apt.nsrc.org/ unstable/\n".
                    "deb-src [trusted=yes] http://netdot.apt.nsrc.org/ unstable/\n\n";
                if ( $debian_version =~ /(wheezy|squeeze)/ ){
                    my $target = $1;
                    $str .= "\n".
                        "deb [trusted=yes] http://netdot.apt.nsrc.org/ $target/\n".
                        "deb-src [trusted=yes] http://netdot.apt.nsrc.org/ $target/\n\n";
                }

You should find that it writes out /etc/apt/sources.list.d/netdot.apt.nsrc.org.list with the [trusted=yes] lines.

hrtrd commented 5 years ago

ubuntu 16.04 same error

[Fri Dec 27 18:01:55.652099 2019] [perl:error] [pid 41385:tid 140102545094528] Attempt to reload DynaLoader.pm aborted.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR.pm line 19.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR.pm line 19.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Pool.pm line 23.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Pool.pm line 23.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request.pm line 26.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request.pm line 26.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request/Param.pm line 27.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/APR/Request/Param.pm line 27.\nCompilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.22/Apache2/Request.pm line 2.\nBEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl5/5.22/Apache2/Request.pm line 2.\nCompilation failed in require at (eval 5) line 2.\n [Fri Dec 27 18:01:55.652200 2019] [perl:error] [pid 41385:tid 140102545094528] Can't load Perl module Apache2::Request for server (null):0, exiting... Action 'configtest' failed.

nicolatron commented 3 months ago

Had similar problems on my dev machine after some debian upgrade (from 11 to 12 maybe), it was some months ago, but didn't need it untill now. After some googling around I now have it working, this is what I did:

After some major debian update, apache refused to load with an error related to not founding Apache2/Request.pm

To fix it, first intall some stuff from apt: sudo apt-get install libapache2-mod-apreq2 libapreq2-dev libapreq2-3 libembperl-perl libapache2-mod-perl2-dev

From cpan (execute cpan): cpan[9]> install /libapreq2/ This will end with error... Can't open perl script "INSTALLDIRS=site": No such file or directory Go to the working dir where it is compilling liapreq2.. To locate it execute:

CPAN> i /libapreq2/
…
    build_dir    /root/.local/share/.cpan/build/libapreq2-2.16-3
…

go to the build_dir (eg: cd /root/.local/share/.cpan/build/libapreq2-2.16-3) and execute:

./configure --prefix=/some/site --enable-perl-glue --with-apache2-apxs=/usr/bin/apxs --with-perl=/usr/bin/perl
make
make install 

Keeps failing. Install this...

sudo apt-get install libapache2-mod-apreq2 libapreq2-dev libapreq2-3 libembperl-perl libapache2-

After this it seems to install...

root@alacran:~/.local/share/.cpan/build/libapreq2-2.16-3# ./configure --prefix=/some/site --enable-perl-glue --with-apache2-apxs=/usr/bin/apxs --with-perl=/usr/bin/perl
root@alacran:~/.local/share/.cpan/build/libapreq2-2.16-3# make
root@alacran:~/.local/share/.cpan/build/libapreq2-2.16-3# make install

With this, Apache2::Request is no longer a problem, but I stumple upon another error... dic 04 12:28:22 alacran apachectl[201069]: [Wed Dec 04 12:28:22.108937 2024] [perl:error] [pid 201069:tid 201069] Can't load Perl module Apache2::SiteControl for server alacra…

This time I went to netdot source dir and executed:

make installdeps
That installed some stuff, errors went away and was able to start apache and netdot again.