http://www.perlmonks.org?node_id=995156

swampyankee has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Mac OS X (10.7.5), and have been trying to install several modules from cpan, specifically PGPLOT and Chart::Gnuplot. I've gotten similar error messages for both:

Running install for module 'Chart::Gnuplot' Running make for K/KW/KWMAK/Chart/Gnuplot/Chart-Gnuplot-0.17.tar.gz Fetching with LWP: ftp://cpan.erlbaum.net/CPAN/authors/id/K/KW/KWMAK/Chart/Gnuplot/Chart- +Gnuplot-0.17.tar.gz Fetching with LWP: ftp://cpan.erlbaum.net/CPAN/authors/id/K/KW/KWMAK/Chart/Gnuplot/CHECKS +UMS Checksum for /Users/emc/.cpan/sources/authors/id/K/KW/KWMAK/Chart/Gnup +lot/Chart-Gnuplot-0.17.tar.gz ok Usage: List: tar -tf <archive-filename> Extract: tar -xf <archive-filename> Create: tar -cf <archive-filename> [filenames...] Help: tar --help Uncompressed /Users/emc/.cpan/sources/authors/id/K/KW/KWMAK/Chart/Gnup +lot/Chart-Gnuplot-0.17.tar.gz successfully Using Tar:/usr/bin/tar x1f "Chart-Gnuplot-0.17.tar": Usage: List: tar -tf <archive-filename> Extract: tar -xf <archive-filename> Create: tar -cf <archive-filename> [filenames...] Help: tar --help Couldn't untar Chart-Gnuplot-0.17.tar Package seems to come without Makefile.PL. (The test -f "/Users/emc/.cpan/build/KWMAK-UCpuQy/Makefile.PL" retur +ned false.) Writing one on our own (setting NAME to ChartGnuplot) Had problems unarchiving. Please build manually Running make test Make had some problems, won't test Running make install Make had some problems, won't install Failed during this command: KWMAK/Chart/Gnuplot/Chart-Gnuplot-0.17.tar.gz: unwrapped NO -- untar +failed

Any ideas about what I'm doing wrong?


Information about American English usage here and here. Floating point issues? Please read this before posting. — emc

Replies are listed 'Best First'.
Re: Trying -- and failing -- to install modules from cpan
by atcroft (Abbot) on Sep 23, 2012 at 02:55 UTC

    The following (from your output) may be a clue as to what is occurring (lines 13 and following):

    Using Tar:/usr/bin/tar x1f "Chart-Gnuplot-0.17.tar":
    Usage:
      List:    tar -tf <archive-filename>
      Extract: tar -xf <archive-filename>
      Create:  tar -cf <archive-filename> filenames...
      Help:    tar --help
    Couldn't untar Chart-Gnuplot-0.17.tar
    

    My guess would be that it is trying to use 'tar x1f filename.tar' to extract it, but that the version of tar on your system requires a '-' on options (thus, 'tar -xf filename.tar'). How to fix that, though, I am not sure (but hope others may be able to suggest).

    Hope that helps.

Re: Trying -- and failing -- to install modules from cpan
by Anonymous Monk on Sep 23, 2012 at 02:51 UTC

    Any ideas about what I'm doing wrong?

    :) maybe you've got weird tar, run  tar --version and send a bug report, rt://cpan

    Try use a different tar, o conf ...

    Also, try  cpanp -i Chart::Gnuplot

    Or try  curl -L http://cpanmin.us | perl - --self-upgrade

    or  wget -O - http://cpanmin.us | perl - --self-upgrade

Re: Trying -- and failing -- to install modules from cpan
by kcott (Archbishop) on Sep 23, 2012 at 08:27 UTC

    G'day swampyankee,

    I'm also running Mac OS X 10.7.5 and had no problem installing from CPAN:

    $ cpan cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help. cpan[1]> install Chart::Gnuplot
    KWMAK/Chart/Gnuplot/Chart-Gnuplot-0.17.tar.gz /usr/bin/make install -- OK cpan[2]> q Lockfile removed.

    I'm using perlbrew with Perl 5.14.2.

    You may already be aware of this but it's generally considered a bad idea to modify Mac OS X's system Perl. If you are doing this, that may have some bearing on your problem (I'm very much guessing here). Here's a discussion of this with some options: Are there any major Perl issues with Mac OS X Lion?

    -- Ken

Re: Trying -- and failing -- to install modules from cpan
by swampyankee (Parson) on Sep 24, 2012 at 01:01 UTC

    Nope; didn't touch the system perl. My perl dates from the installation of the o/s; both tar xvf <tarfile> and tar -xvf <tarfile> work. I'm thinking I've done something to screw up cpan, probably using o conf.


    Information about American English usage here and here. Floating point issues? Please read this before posting. — emc