fuzioneer

Well-Known Member
Dec 12, 2003
100
0
166
Been trying to install Bugzilla upgrade on a cPanel server

Got so far and it asked me to run the command "/usr/bin/perl install-module.pl --all"

I did this but now it has broken quite a few things that rely on Perl

and if i try and run certain Perl scripts I get the error as follows:-

Code:
Can't locate Exporter.pm in @INC (@INC contains: /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 /usr/lib/perl5/5.8.8/Carp.pm line 193.
Compilation failed in require at /usr/lib/perl5/5.8.8/warnings.pm line 134.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.8/warnings.pm line 134.
Compilation failed in require at /usr/lib/perl5/5.8.8/File/Basename.pm line 52.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.8/File/Basename.pm line 52.
Compilation failed in require at ./checksetup.pl line 47.
BEGIN failed--compilation aborted at ./checksetup.pl line 47.

HELLLPPPP :)
 

fuzioneer

Well-Known Member
Dec 12, 2003
100
0
166
this is the content of the install-module.pl script

Code:
#!/usr/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Everything Solved, Inc.
# Portions created by Everything Solved are Copyright (C) 2007
# Everything Solved, Inc. All Rights Reserved.
#
# Contributor(s): Max Kanat-Alexander <[email protected]>

use strict;
use warnings;

# Have to abs_path('.') or calls to Bugzilla modules won't work once
# CPAN has chdir'ed around. We do all of this in this funny order to
# make sure that we use the lib/ modules instead of the base Perl modules,
# in case the lib/ modules are newer.
use Cwd qw(abs_path cwd);
use lib abs_path('.');
use Bugzilla::Constants;
use lib abs_path(bz_locations()->{ext_libpath});

use Bugzilla::Install::CPAN;

use Bugzilla::Constants;
use Bugzilla::Install::Requirements;
use Bugzilla::Install::Util qw(bin_loc init_console vers_cmp);

use Data::Dumper;
use Getopt::Long;
use Pod::Usage;

init_console();

my @original_args = @ARGV;
my $original_dir = cwd();
our %switch;
GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g',
                     'shell', 'help|h');

pod2usage({ -verbose => 1 }) if $switch{'help'};

if (ON_WINDOWS) {
    print "\nYou cannot run this script on Windows. Please follow instructions\n";
    print "given by checksetup.pl to install missing Perl modules.\n\n";
    exit;
}

pod2usage({ -verbose => 0 }) if (!%switch && [email protected]);

set_cpan_config($switch{'global'});

if ($switch{'show-config'}) {
    print Dumper($CPAN::Config);
    exit;
}

check_cpan_requirements($original_dir, \@original_args);

if ($switch{'shell'}) {
    CPAN::shell();
    exit;
}

if ($switch{'all'} || $switch{'upgrade-all'}) {
    my @modules;
    if ($switch{'upgrade-all'}) {
        @modules = (@{REQUIRED_MODULES()}, @{OPTIONAL_MODULES()});
        push(@modules, DB_MODULE->{$_}->{dbd}) foreach (keys %{DB_MODULE()});
    }
    else {
        # This is the only time we need a Bugzilla-related module, so
        # we require them down here. Otherwise this script can be run from
        # any directory, even outside of Bugzilla itself.
        my $reqs = check_requirements(0);
        @modules = (@{$reqs->{missing}}, @{$reqs->{optional}});
        my $dbs = DB_MODULE;
        foreach my $db (keys %$dbs) {
            push(@modules, $dbs->{$db}->{dbd})
                if !have_vers($dbs->{$db}->{dbd}, 0);
        }
    }
    foreach my $module (@modules) {
        my $cpan_name = $module->{module};
        # --all shouldn't include mod_perl2, because it can have some complex
        # configuration, and really should be installed on its own.
        next if $cpan_name eq 'mod_perl2';
        next if $cpan_name eq 'DBD::Oracle' and !$ENV{ORACLE_HOME};
        next if $cpan_name eq 'DBD::Pg' and !bin_loc('pg_config');
        install_module($cpan_name);
    }
}

foreach my $module (@ARGV) {
    install_module($module);
}

__END__

=head1 NAME

install-module.pl - Installs or upgrades modules from CPAN.
This script does not run on Windows.

=head1 SYNOPSIS

  ./install-module.pl Module::Name [--global]
  ./install-module.pl --all [--global]
  ./install-module.pl --upgrade-all [--global]
  ./install-module.pl --show-config
  ./install-module.pl --shell

  Do "./install-module.pl --help" for more information.

=head1 OPTIONS

=over

=item B<Module::Name>

The name of a module that you want to install from CPAN. This is the
same thing that you'd give to the C<install> command in the CPAN shell.

You can specify multiple module names separated by a space to install
multiple modules.

=item B<--global>

This makes install-module install modules globally for all applications,
instead of just for Bugzilla.

On most systems, you have to be root for C<--global> to work.

=item B<--all>

This will make install-module do its best to install every required
and optional module that is not installed that Bugzilla can use.

Some modules may fail to install. You can run checksetup.pl to see
which installed properly.

=item B<--upgrade-all>

This is like C<--all>, except it forcibly installs the very latest
version of every Bugzilla prerequisite, whether or not you already
have them installed.

=item B<--show-config>

Prints out the CPAN configuration in raw Perl format. Useful for debugging.

=item B<--shell>

Starts a CPAN shell using the configuration of F<install-module.pl>.

=item B<--help>

Shows this help.

=back
 

fuzioneer

Well-Known Member
Dec 12, 2003
100
0
166
i get the following cPtechie

Code:
Can't locate Exporter.pm in @INC (@INC contains: /usr/local/cpanel /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 /usr/lib/perl5/5.8.8/Carp.pm line 193.
Compilation failed in require at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/IO/Handle.pm line 263.
BEGIN failed--compilation aborted at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/IO/Handle.pm line 263.
Compilation failed in require at /scripts/upcp line 20.
BEGIN failed--compilation aborted at /scripts/upcp line 20.
determined that upcp had compilation issues.. updating
Can't locate Exporter.pm in @INC (@INC contains: /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 /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Fcntl.pm line 60.
Compilation failed in require at Cpanel/LoadFile.pm line 8.
BEGIN failed--compilation aborted at Cpanel/LoadFile.pm line 8.
Compilation failed in require at Cpanel/OSSys.pm line 9.
BEGIN failed--compilation aborted at Cpanel/OSSys.pm line 9.
Compilation failed in require at ./scripts/updatenow line 9.
BEGIN failed--compilation aborted at ./scripts/updatenow line 9.
Can't locate Exporter.pm in @INC (@INC contains: /usr/local/cpanel /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 /usr/lib/perl5/5.8.8/Carp.pm line 193.
Compilation failed in require at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/IO/Handle.pm line 263.
BEGIN failed--compilation aborted at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/IO/Handle.pm line 263.
Compilation failed in require at /scripts/upcp line 20.
BEGIN failed--compilation aborted at /scripts/upcp line 20.
 

fuzioneer

Well-Known Member
Dec 12, 2003
100
0
166
seems all perl scripts are broken !

/scripts/perlinstaller --force DateTime doesnt work same sort of error
 

LinuxTechie

Well-Known Member
Jan 22, 2011
502
14
68
cPanel Access Level
Root Administrator
Hello,

Okay. I was googling for a fix. But was not able to find one. Can you please open a ticket to cPanel regarding this? Please don't forget to post the fix here.
 

fuzioneer

Well-Known Member
Dec 12, 2003
100
0
166
as a dedicated server lease. I don't believe I am supposed to log tickets with cPanel ?
and as the server is a dedicated server I don't think the network provider will be that interested either ?
 

fuzioneer

Well-Known Member
Dec 12, 2003
100
0
166
well i have partially got somewhere ;)

I found the Exporter.pm file and then added a line in my .bashrc as follows:-

PERL5LIB = /pathtoexporter.pm

this then appends to the @INC paths and so I can actually do some things in perl now ;)
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Please copy Exporter.pm to the path /usr/lib/perl5/5.8.8/Exporter.pm if you've found a copy of it on your system, then re-install Perl on your machine:

Code:
cd /usr/local/src && wget -N http://httpupdate.cpanel.net/perl588installer.tar.gz && tar -xzvf perl588installer.tar.gz && chown -vhR 0:0 perl588installer && cd perl588installer && ./install
After that completes, run a full forced perl modules check:

Code:
/scripts/checkperlmodules --full --force
I had a ticket recently where a Bugzilla upgrade did the exact same thing. It might be a good idea to lodge a report with Bugzilla about their update causing Exporter.pm to go missing.
 

labrat

Registered
Apr 13, 2011
2
0
51
I had the exact problem that fusioneer had.

I tried the above steps to reinstall Perl and then run a module check and it appears that Perl is running again but I am still not able to access cPanel.

Of course my Bugzilla install still isn't working either but for now I'm just trying to get back into cPanel.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Is it still throwing an error message about any perl module that's missing? Please check /usr/local/cpanel/logs/error_log location and provide any error messages being received there.

Also, please try to restart cPanel if it was possibly still down:

Code:
/etc/init.d/cpanel restart
 

labrat

Registered
Apr 13, 2011
2
0
51
Yay! cPanelTristan !!

Silly me... I should have checked whether it had been restarted.

That worked! Thanks a bunch! :)