I'd been away from Perl for a little while ... long enough, you know, to forget a few things (like, say, "everything"). Long enough, in particular, to be momentarily baffled by an error in the "uncompress" routine when I tried to use CPAN after a long absence.
"It's all coming back to me now," but for You, Gentle Reader, let me summarize what I did to solve the problem.
First of all, since I do a lot of maintenance of Perl-based web-sites (on a Gentoo Linux system, whose core system-maintenance system is also Perl-based), I maintain my own separate versions of most Perl packages. (It's just like what you have to do when you're working on a virtual-host environment, and you of-course can't update the Perl environment of the host system, but must arrange things particularly for "this or that site.") This means that, in my CPAN configuration, I've got my own custom settings for make_install_arg and makepl_arg, to define "SITEPREFIX=" and "PREFIX=",respectively.
CPAN wasn't working because it would no longer uncompress things. So, in a nutshell, this is what I did.
First, I went to CPAN and downloaded IO::Compress::ZLib. I uncompressed the tar file and moved the resulting folder to my local ~/.cpan/build directory, then cd'd to it. I then reviewed the README for further instructions. When I performed the perl Makefile.PL step, it told me that I had an outdated prerequisite module.
Therefore, I downloaded the prereq, Compress::Raw::ZLib, and prepared it using the sequence I will now describe. (So, I did this and then I then went back and did the same for IO::Compress::ZLib, but I won't repeat myself.)
Executing the cpan command and then using o conf, I wrote down the settings for makepl_arg (let's say it was PREFIX="/mysites"), and make_install_arg (say it was SITEPREFIX="/mysites"). Then I quit cpan.
I cd'd into ~/.cpan/build/IO-Compress-Zlib-2.015 (this being the version I'd just downloaded) and entered the command: perl Makefile.PL PREFIX="/mysites"
Next two steps (according to the README) were make then make test
I now attempted to do SITEPREFIX="/mysites" make install but it failed because it was trying to uninstall the host's version ... which my non-rootly userID (quite by-design) could not do.
This was remedied by specifying that I didn't want to uninstall: SITEPREFIX="/mysites" UNINST=0 make install This time, it installed properly.
Now, having thusly installed the pre-requisite, I went back and installed IO::Compress::ZLib using the same procedure. (I told you I wouldn't repeat myself...)
Once this was done, CPAN was up-and-running again. I started bringing my installation back up-to-date by upgrading and reloading CPAN, then the other packages that were by now gathering so much dust.
I hope this helps somebody.
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How I fixed it: CPAN crashing on "Uncompress"
by Tanktalus (Canon) on Dec 10, 2008 at 05:27 UTC | |
by paulj (Novice) on Dec 11, 2008 at 05:49 UTC | |
|
Re: How I fixed it: CPAN crashing on "Uncompress"
by locked_user sundialsvc4 (Abbot) on Dec 16, 2008 at 01:27 UTC |