Help - Search - Members - Calendar
Full Version: HOW-TO: Fix the cPanel perl errors
The Planet Forums > Control Panels > cPanel/WHM > Cpanel/WHM HOWTOs
eth00
I took this from my site http://www.eth0.us/cpanel-perl-fix
It should fix all the perl/realperlinstaller/stats issues that have cropped up in the last week.


This email was sent out to all of those who directly purchase cPanel licenses, of course if you are like most people and do not directly own a license but get it through a datacenter you never got this email. I have pasted it below which also contains a fix for the perl problems which are causing a lot of trouble with just about everything, including email. I have corrected a few typo's in the email so that just copy and pasting it will now work, it was not working for their version, and added a few more commands that I needed on some servers.

Here is the copy/paste version I created:
ls -alh /root/.gnupg
(just make sure it exists)

cd /usr/local/src/
wget http://search.cpan.org/CPAN/authors/id/G/G...rl-5.805.tar.gz
tar zxvf libwww-perl-5.805.tar.gz
cd libwww-perl-5.805
perl Makefile.PL
make
make install
cd ../

wget http://search.cpan.org/CPAN/authors/id/A/A...PAN-1.82.tar.gz
tar zxvf CPAN-1.82.tar.gz
cd CPAN-1.82
perl Makefile.PL
make
make install

/usr/local/cpanel/bin/checkperlmodules
/scripts/updatenow
/scripts/rrdtoolinstall

Here is the cPanel email:

The cPanel product for Linux and BSD is maturing nicely. We've made a long term commitment to improving its stability and performance.
However, as many of you are already aware, our software relies upon a number of third party applications and tools. We do our best to ensure compatibility, but on occasion problems can and do arise. We've recently experienced issues with Perl's CPAN installer module which was updated on January 3rd. We have reported the issue to the maintainer of CPAN, and an update has been released to address the issue. However, it may take up to 48 hours for the update to reach all CPAN mirrors.

This issue should only be significant for new installations of Perl, including new installs of cPanel. We've introduced some changes to our Perl module installation routines to improve compatibility, and we are currently testing new code to prevent this issue from ever occurring again. Until then, these are a few of the steps that you can take to ensure continued normal operation of your cPanel server.

1. Ensure that the directory /root/.gnupg exists.

The latest versions of CPAN are using Module::Signature by default. This module will check the GPG signature of modules during their installation. If your server is using Module::Signature and this directory does not exist, then the signature check will fail and the module will not be installed or updated. This will be handled automatically in all builds dated January 4th or later.

2. Ensure that the Perl's LWP is installed.

If LWP is not installed, and Net::FTP is not used (and it's often skipped), CPAN will attempt to fetch the Perl module using one of the system applications, such as wget. In this case, the module will be saved without its proper extension and the installation will exit shortly after downloading the module. You can install LWP manually using the following commands:

wget http://search.cpan.org/CPAN/authors/id/G/G...rl-5.805.tar.gz
tar zxvf libwww-perl-5.805.tar.gz
cd libwww-perl-5.805
perl Makefile.PL
make
make install

When running "perl MakeFile.PL" you will be asked several questions.
It's safe to accept the default values.

3. Install the updated version of CPAN (1.82)

Updating CPAN will resolve both issues "1" and "2" for you as well as other issues. On productions systems (which almost always have a working LWP installed) this will occur automatically. To install CPAN manually, the steps are very similar to the above steps for LWP:

wget http://search.cpan.org/CPAN/authors/id/A/A...PAN-1.82.tar.gz
tar zxvf CPAN-1.82.tar.gz
cd CPAN-1.82
perl Makefile.PL
make
make install

If you experienced problems with any recent installations and resolved them, then it is recommended that you run the following command:

/usr/local/cpanel/bin/checkperlmodules

This command is ran automatically by our update system. Running this command on new installs will ensure a proper Perl setup, otherwise it is optional.

Please let us know if there is are any additional ways that we can help you get through this issue.

Thank you.
anders0x
There seems to be one additional issue in the cPanel version in the interactivity with the CPAN installer. There is one question which isn't answered properly, resulting in an endless repeat.

This is the output from my upcp:



zlib-devel is up to date
hwdata is up to date
postgresql is up to date
postgresql-contrib is up to date
postgresql-devel is up to date
postgresql-docs is up to date
postgresql-libs is up to date
postgresql-server is up to date
postgresql-tcl is up to date
Testing connection speed...(this could take a while)....Done
Three usable mirrors located
Mirror Check passed for cpan.erlbaum.net
Sorry, we have to rerun the configuration dialog for CPAN.pm due to
the following indispensable but missing parameters:

mbuild_arg, mbuild_install_arg, mbuild_install_build_command, mbuildpl_arg

/usr/lib/perl5/5.6.1/CPAN/Config.pm initialized.


CPAN is the world-wide archive of perl resources. It consists of about
100 sites that all replicate the same contents all around the globe.
Many countries have at least one CPAN site already. The resources
found on CPAN are easily accessible with the CPAN.pm module. If you
want to use CPAN.pm, you have to configure it properly.

If you do not want to enter a dialog now, you can answer 'no' to this
question and I'll try to autoconfigure. (Note: you can revisit this
dialog anytime later by typing 'o conf init' at the cpan prompt.)

Are you ready for manual configuration? [yes] yes


The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide directory or a personal directory.



I see you already have a directory
/home/.cpan
Shall we use it as the general CPAN build and cache directory?

CPAN build and cache directory? [/home/.cpan] /home/.cpan


If you like, I can cache the source files after I build them. Doing
so means that, if you ever rebuild that module in the future, the
files will be taken from the cache. The tradeoff is that it takes up
space. How much space would you like to allocate to this cache? (If
you don't want me to keep a cache, answer 0.)



How big should the disk cache be for keeping the build directories
with all the intermediate files?

Cache size for build directory (in MB)? [10] 10


By default, each time the CPAN module is started, cache scanning is
performed to keep the cache size in sync. To prevent this, answer
'never'.

Perform cache scanning (atstart or never)? [atstart] atstart


To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable
is not available, the normal index mechanism will be used.

Cache metadata (yes/no)? [yes] yes


The next option deals with the charset (aka character set) your
terminal supports. In general, CPAN is English speaking territory, so
the charset does not matter much, but some of the aliens out there who
upload their software to CPAN bear names that are outside the ASCII
range. If your terminal supports UTF-8, you should say no to the next
question. If it supports ISO-8859-1 (also known as LATIN1) then you
should say yes. If it supports neither, your answer does not matter
because you will not be able to read the names of some authors
anyway. If you answer no, names will be output in UTF-8.

Your terminal expects ISO-8859-1 (yes/no)? [yes] yes


If you have one of the readline packages (Term::ReadLine::Perl,
Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
shell will have history support. The next two questions deal with the
filename of the history file and with its size. If you do not want to
set this variable, please hit SPACE RETURN to the following question.

File to save your history? [/home/.cpan/histfile] /home/.cpan/histfile
Number of lines to save? [100] 100


The 'd' and the 'm' command normally only show you information they
have in their in-memory database and thus will never connect to the
internet. If you set the 'show_upload_date' variable to true, 'm' and
'd' will additionally show you the upload date of the module or
distribution. Per default this feature is off because it may require a
net connection to get at the upload date.

Always try to show upload date with 'd' and 'm' command? [0] 0


The CPAN module can detect when a module which you are trying to build
depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.

Policy on building prerequisites (follow, ask or ignore)? [follow] follow


The CPAN module will need a few external programs to work properly.
Please correct me, if I guess the wrong path for a program. Don't
panic if you do not have some of them, just press ENTER for those. To
disable the use of a download program, you can type a space followed
by ENTER.

Where is your bzip2 program? [/usr/bin/bzip2] /usr/bin/bzip2
Where is your gzip program? [/bin/gzip] /bin/gzip
Where is your tar program? [/bin/tar] /bin/tar
Where is your unzip program? [/usr/bin/unzip] /usr/bin/unzip
Where is your make program? [/usr/bin/make] /usr/bin/make
Where is your curl program? [/usr/bin/curl] /usr/bin/curl
Where is your lynx program? [/usr/bin/lynx] /usr/bin/lynx
Where is your wget program? [/usr/bin/wget] /usr/bin/wget
Where is your ncftpget program? [/usr/bin/ncftpget] /usr/bin/ncftpget
Where is your ftp program? [/usr/bin/ftp] /usr/bin/ftp
Where is your gpg program? [/usr/bin/gpg] /usr/bin/gpg
What is your favorite pager program? [/usr/bin/less] /usr/bin/less
What is your favorite shell?


When you have Module::Build installed and a module comes with both a
Makefile.PL and a Build.PL, which shall have precedence? The two
installer modules we have are the old and well established
ExtUtils::MakeMaker (for short: EUMM) understands the Makefile.PL and
the next generation installer Module::Build (MB) works with the
Build.PL.

In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []
In case you could choose, which installer would you prefer (EUMM or MB)? []

eth00
Do what I posted above and it iwll have you go through that installer so it does not loop and cause all the cpu problems.
anders0x
Hi,
thank you for helping out.

I actually did that before posting and then it took me through the guide manually, and I could manually answer the "critical" question with one of the choices.
However when I, after that, reran "Upgrade to Latest Version" under cPanel in WHM, it still entered into the config guide and got into the same endless loop.

Best Regards,
Anders
ohvhost
the CPAN link should be updated to 1.83 now. 1.82 is no longer avialable at the link provided
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.