Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install any perl modules because it can't location strict.pm

Hello StackOverflow Community,

I am trying to install a perl module, IO::All. But every time I use CPAN to install many perl modules (including if I run from within cpan "install Build::CPAN") it fails with

Can't locate strict.pm in @INC (@INC contains: /dev/null/lib/perl5.8-dist/Linux-2.6c2.5-x86_64-64int /dev/null/lib/perl5.8-dist /dev/null/lib/perl5.8-dist/Linux-2.6c2.5-x86_64-64int /dev/null/lib/perl5.8-dist /dev/null/lib/perl5.8-dist .) at Build.PL line 2.

This has been baffling me for hours. I've googled around and can't seem to find a solution. Running something like

perl -e 'use strict; print "ok"'

Outputs just fine. And the original file I was trying to run, which asks for IO::All uses strict as well. How is strict even missing? Isn't strict part of perl by default? And where is /dev/null? Isn't that a special location where you can pass in stderr/stdout if you don't care about that? I've been pulling my hair out about this for a while. I must be missing something obvious.

This is running on a Rhel5 Virtual Machine Linux-2.6-x86_64 variant.

Your help is much appreciated. Let me know if I need to provide further information.

Thank you, -Asaf

like image 242
Asaf Avatar asked Apr 05 '14 19:04

Asaf


1 Answers

I have this issue today. I compiled perl 5.14 and install to my home directory ($HOME/perl5.14/).

Because perl5.14 install some minimum perl5 libraries, you have to include the directory into $PERL5LIB=$HOME/perl5.14/usr/local/lib/perl5/5.14.2

Hope this works for you :)

like image 72
benck Avatar answered Sep 29 '22 15:09

benck