5
$ perl -MCPAN -e 'install XML::Simple'

Reading '/u/.cpan/Metadata'
  Database was generated on Fri, 14 Oct 2016 19:29:02 GMT
Running install for module 'XML::Simple'
Checksum for /u/.cpan/sources/authors/id/G/GR/GRANTM/XML-Simple-2.22.tar.gz ok
directory tmp-9128 changed before chdir, expected dev=235194353 ino=7590237479028601933, actual dev=235194353 ino=15919093302750535503, aborting. at /usr/share/perl5/core_perl/CPAN/Distribution.pm line 623.

Please suggest any solution, even manually download and install is not working.

6
  • what version of perl? what OS? what other modules did you try? for XML::Simple, did you read this notice by the author?
    – stevieb
    Oct 14, 2016 at 20:58
  • mingw64 is git bash shell in windows 8.1, by the way the same module works in Linux. Oct 14, 2016 at 22:05
  • 1
    This happened to me a lot recently with cygwin on a new laptop with Windows 10. Eventually it stopped doing this. Sorry I don't know why it happened or why it stopped. Manual download and install should work (though it will be a pain to deal with each dependency yourself), unless it is "not working" in a different way.
    – mob
    Oct 14, 2016 at 22:07
  • @mob I don't have a win10 box, but would something like this work? wget https://cpan.metacpan.org/authors/id/M/MI/MIROD/XML-Twig-3.49.tar.gz, then the typical perl Makefile.PL && make && make test && make install
    – stevieb
    Oct 14, 2016 at 23:01
  • That's the basic idea. There are still a lot of ways it can go wrong (other Perl dependencies, missing libraries, broken tool chain, module ultimately not supported on Cygwin, ...)
    – mob
    Oct 14, 2016 at 23:04

3 Answers 3

4

Git Bash installs perl along with /usr/bin/core_perl/cpan, but it doesn't actually come with the CPAN:: module.

There's a lot about Git Bash I'm starting to hate in regards to how it looks like it supports something even when it doesn't. It's like someone took a pocket knife to a perfectly good MINGW install and sliced it up like a rotten apple.

They even copied cygpath into their install so that people could convert paths. It's really starting to look like the sensible thing is to just install Cygwin and give up on Git Bash.

3

After much discussion found no solution to this and it seems the Mingw/git bash shell does not support all the CPAN modules, even though the same works fine from Linux boxes and I was able to use it from local Virtual Box setup.

2

Install Strawberry Perl. Then in a normal Windows cmd shell do:

C:\Users\abb> cpanm XML::Simple

Then back in Git Bash invoke Perl with /c/Strawberry/perl/bin/perl.exe or update the shebang in your script to:

#!/c/Strawberry/perl/bin/perl.exe
1
  • A most excellent workaround! I can't believe there isn't a cleaner answer! Thanks! Feb 25 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.