-1

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
Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
dannyhmg
  • 135
  • 8
  • You understand `sudo cpan` and `cpan` are different things, right? – Sinan Ünür Aug 07 '17 at 13:25
  • Also you understand [you should not mess with the Perl install that comes with your system](https://www.effectiveperlprogramming.com/2015/11/apple-recommends-installing-your-own-perl/), right? – Sinan Ünür Aug 07 '17 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 07 '17 at 13:52
  • Post the output of `sudo which perl` versus `which perl`. Also `sudo which cpan` and `which cpan`. ... – Sinan Ünür Aug 07 '17 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 07 '17 at 14:52
  • Uh, ok. Not exactly the helpful response I was looking for. So, your recommendation is to install a new Perl, and install Date::Manip there? I guess I could do that, but it still doesn't answer my original question: How do I get cpan to locate and use a previously-installed dependency? – dannyhmg Aug 07 '17 at 14:56
  • I don't and cannot know the particular way in which you borked the Perl that came with your operating system, and therefore I am not interested in spending more time on your particular question. – Sinan Ünür Aug 07 '17 at 15:23
  • It should be clear enough from the post that I am a bit confused about what's going on, and looking for help. If you're not interested in helping, then I'm not sure why you bothered to reply. The snarky response and -1 vote are uncalled for. – dannyhmg Aug 07 '17 at 16:38

1 Answers1

3

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.

ysth
  • 96,171
  • 6
  • 121
  • 214
  • 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 08 '17 at 21:45