0

I'm trying to install the DateTime module. I went into CPAN from a terminal and started the install with make. It ran for hours and when it finally stopped, the last line simply said 'killed'. My perl script using the module still won't compile, it says Can't locate DateTime.pm in @INC (you may need to install the DateTime module)

I searched the file system and found the following:

/home/kelly/.cpan/build/DateTime-1.54-0/lib/DateTime /home/kelly/.cpan/build/DateTime-Locale-1.33-1/lib/DateTime /home/kelly/.cpan/build/DateTime-1.54-1/lib/DateTime /home/kelly/.cpan/build/DateTime-Locale-1.33-0/lib/DateTime 

So apparently the module is there but Perl can't find it?

I had previously tried installing the module and stopped it because I thought it was in an infinite loop. Also, I had previously installed some updates and hadn't restarted the computer yet. But it doesn't seem likely that either of those interfered...

5
  • What Linux distribution or unix-like OS are you using? If Linux, DateTime is almost certainly available as a package for your distro (e.g. sudo apt-get install libdatetime-perl on debian and derivatives). BTW, note that the ~/.cpan/build/ directory is the directory that cpan uses to build a module before installing it. It is not the final built module. The last line you mention, "killed", is nowhere near enough info to determine the cause of the build failure. You'll need to read and understand previous lines. What kind of system are you building on? a PC with lots of RAM? Commented Dec 11, 2021 at 4:19
  • Or a tiny system with very little RAM or disk space? Also note that DateTime depends on the XSLoader module. This means that at least part of the module is compiled code, rather than interpreted perl-native code, and requires a compiler like gcc to be installed and working. And, DateTime is a library module with numerous dependencies - the build failure may be in one of those modules rather than in DateTime itself. This is yet another reason why you should install a pre-built package rather than build it yourself - all those dependencies will already be built and packaged. Commented Dec 11, 2021 at 4:21
  • I'm not sure if I'm supposed to reply here or edit the OP. I'm running Linux Mint 20.1 on a relatively old laptop, and I have very little experence. I thought I was installing a pre-built package. Oh, and I just confirmed I have gcc installed. I have a screenshot of what came before the "killed" statement, but I don't see a way to upload that. Wherever I can get a pre-built package, I would happily use that, just tell me where... when I searched, all I found was CPAN and the instructions I used... Commented Dec 11, 2021 at 20:17
  • I tried again with install instead of make, and it worked. Back in business, writing my script... Thank you! Commented Dec 11, 2021 at 20:40
  • According to community.linuxmint.com/software/view/libdatetime-perl it seems to be packaged, with the same name as in debian and ubuntu, which is not surprising as most things in debian & ubuntu end up in mint. Try the sudo apt-get install ... command from my first comment. Commented Dec 12, 2021 at 1:04

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.