Check which cpan is being called. You are probably using the version from msys2, which is why it then looks for /usr/bin/tar.

On my system:

where cpan C:\berrybrew\5.28.0_64_PDL\perl\bin\cpan.bat

If you are running the portable shell that comes with Strawberry Perl then it should put all the strawberry paths at the front of %PATH%. Perhaps double check that you are using that shell.

And FWIW, I have MSYS2 and several versions of Strawberry perl installed on my system (via Berrybrew) and they don't interfere with each other. That said, none of them are in my default path. I only ever start MSYS2 from its menu option, and strawberry perl via a bat file that prepends the paths (similar to what its portable shell does).


In reply to Re: cpan install fails with bad tar call by swl
in thread cpan install fails with bad tar call by RockyRoccoco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.