Closed Levelleor closed 2 years ago
"Invalid metadata structure" is not the actual error message. That is a quote from a compilation failure of /usr/local/bin/cpanm
at line 68, which is bizarre, and doubly weird because cpanm itself seemed to have run correctly to a point where it fetched the tarball.
I'm not really sure what's happening, but given that you have no issues with running it outside Puppet, I'd bet it would be a different PATH, or some other environment variables that are in play.
Looks like it was using a different version of Perl that I've fixed by setting a strict PATH. Then defining both $HOME and $PERL_CPANM_HOME fixed the issue. Now just have to get rid of all the extra perl's.
It would be nice if it logged this issue correctly, though, I spent quite some time on finding the solution.
I am unable to get cpanm working via Puppet. Manually everything's fine, when running via Puppet all sorts of issues come up. First one was solved defining PERL_CPANM_HOME as per https://github.com/miyagawa/cpanminus/issues/37.
Though now I face "Invalid metadata structure" issue on MacOS.
Here're the logs I get:
Any suggestions on how to get further? Or maybe anyone has any suggestions of how to properly install cpan modules via Puppet?