Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I am trying to install Date::Manip on Mac OS X 10.10 using cpan. I have Xcode and command line tools installed. When I type

sudo cpan -i Date::Manip I see the following error:

---- Unsatisfied dependencies detected during ----
----       SBECK/Date-Manip-6.59.tar.gz       ----
ExtUtils::MakeMaker [build_requires]`  

This doesn't make sense, because ExtUtils::MakeMaker is already installed on my system:

$ cpan -D ExtUtils::MakeMaker
Reading '/Users/myname/.cpan/Metadata'
Database was generated on Sun, 06 Aug 2017 20:17:02 GMT
ExtUtils::MakeMaker
Writes Makefiles for extensions
B/BI/BINGOS/ExtUtils-MakeMaker-7.30.tar.gz
/System/Library/Perl/5.18/ExtUtils/MakeMaker.pm
Installed: 6.66
CPAN:      7.30  Not up to date
Michael G Schwern (MSCHWERN)
mschwern at cpan.org

I don't understand why the Date::Manip install can't find it.

The installer next tries to install ExtUtils::MakeMaker (since it thinks it's missing), and that installation fails. That may be a separate issue, but I'm not concerned with that at the moment - I just want to get Date::Manip installed, using the current version of MakeMaker.

How can I get cpan to locate and use the current installed version of ExtUtils::MakeMaker?

Additional information:

$ sudo which perl
/usr/bin/perl
$ which perl
/usr/bin/perl
$ sudo which cpan
/usr/bin/cpan
$ which cpan
/usr/bin/cpan
                Also you understand you should not mess with the Perl install that comes with your system, right?
– Sinan Ünür
                Aug 7, 2017 at 13:25
                Yes, I'm aware I shouldn't mess with the pre-installed Perl - that's why I don't really want to re-install MakeMaker.  I was not aware that sudo cpan and cpan were different (I just wanted to run cpan as root), but I just did a quick test and they both give identical results in this case.
– dannyhmg
                Aug 7, 2017 at 13:52
                Post the output of sudo which perl versus which perl. Also sudo which cpan and which cpan. ...
– Sinan Ünür
                Aug 7, 2017 at 14:01
                So, you are indeed trying to mess with your system Perl. I am inclined not to delve into this any further.
– Sinan Ünür
                Aug 7, 2017 at 14:52

Date::Manip requires version 6.67_01 of MakeMaker, and you only have 6.66. See: https://metacpan.org/source/SBECK/Date-Manip-6.59/META.json

So figure out why the MakeMaker install is failing. Or install SBECK/Date-Manip-6.53.tar.gz or earlier.

I don't know precisely why the MakeMaker install was failing, but after upgrading my Xcode from 4.6.3 to 7.1.2, I was able to install both MakeMaker and Date::Manip without further issues. Thanks for your answer. – dannyhmg Aug 8, 2017 at 21:45

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.