in reply to Problems installing Archive::Zip

Hi (neighbor) Dave,

I believe I put both the .zip and the .tar.gz version on CPAN when I put 0.11 there. My guess is that your problem comes from running gzip on a .zip file, which it can't handle. Gzip can only handle .gz files. If you want to make CPAN install a .zip file (not that you need to), you need to install the Info-Zip tools to get zip and unzip. And you have to re-configure CPAN. It's probably easier just to ditch the .zip file and get the .tar.gz one.

update: Yes, there is the tar.gz version at the same place.

Replies are listed 'Best First'.
Re: Re: Problems installing Archive::Zip
by dvergin (Monsignor) on Jun 23, 2001 at 09:40 UTC
    Ah-hah!

    The .tar.gz version of version 0.11 is in the author directory but not in the by-module directory. How do I force CPAN to grab the .tar.gz version.

    Failing that, I'll just go the Make route...

      You know, this is the first time I've noticed that. I'll get in touch with CPAN about it tomorrow. For some reason, every time I run cpan interactively it gets the .tar.gz version. Perhaps you could blow away the .zip version and the cached cpan indices and try again. Or you could get the info-zip tools and re-configure CPAN.pm? I have no idea how to fix cpan's idea of where to get a module. I'd ask Andreas Koenig <andreas.koenig@anima.de> how that all works. Odd that it works for most everybody (I've never heard of this particular problem).

      update: Or (which might be much easier), just grab the .tar.gz, unpack it somewhere, then go:

      perl Makefile.PL make make test make install # as root

      update: After some thought, it looks like your CPAN.pm may be misconfigured. If you go o conf at the cpan interactive prompt, you can see its configuration. You should look at the settings for:

      build_dir /usr/local/cpan/build cpan_home /usr/local/cpan gzip /bin/gzip keep_source_where /usr/local/cpan/sources keep_sources_where /usr/local/cpan/sources tar /bin/tar unzip /usr/bin/unzip
      and make sure that they're all correct. Especially make sure that unzip is set to something that can handle .zip files. It sounds like your unzip is set to point to gzip.
        Perhaps you could blow away... the cached cpan indices

        Not sure where these are. I checked around a few directories. Are you referring to the stuff in /root/.cpan/sources/modules? If not, what/where?