Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Can't locate Config.pm in @INC

by powerperl (Initiate)
on Jun 21, 2022 at 19:30 UTC ( [id://11144917]=perlquestion: print w/replies, xml ) Need Help??

powerperl has asked for the wisdom of the Perl Monks concerning the following question:

perl -V Can't locate in @INC BEGIN failed--compilation aborted.

Replies are listed 'Best First'.
Re: Can't locate Config.pm in @INC
by LanX (Saint) on Jun 21, 2022 at 21:14 UTC
    > @INC has paths of two versions of perl.

    This is an open invite for a multitude of problems.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      It works fine with recompiled perl
Re: Can't locate Config.pm in @INC
by syphilis (Archbishop) on Jun 22, 2022 at 10:21 UTC
    perl -V Can't locate Config.pm in @INC (you may need to install the Config module) (@INC contains: …).

    powerperl, were there any directories listed there ? Or did it actually specify (@INC contains:) - in which case @INC is definitely empty.

    Oddly enough, I've just been building various configurations of unthreaded perl-5.37.1 on Windows. They've all built, tested and installed without any errors but they all have an empty @INC:
    >perl -V Can't locate Config.pm in @INC (you may need to install the Config mod +ule) (@INC contains:). BEGIN failed--compilation aborted.
    No such problem with the threaded builds of perl-5.37.1.
    I've never seen the like of it before !!

    However, if your @INC is not empty, then you and I are almost certainly facing different issues.

    Cheers,
    Rob
      @INC is not empty so we are on different paths
Re: Can't locate Config.pm in @INC
by ikegami (Patriarch) on Jun 21, 2022 at 20:11 UTC

    Path mentioned in @INC has Config.pm

    If so, then the process has insufficient permissions to read both the directory and the file.

      It works fine when perl recompiled

        In the OP, you said the paths were in @INC. But since PERL5LIB simply adds to @INC, it appears that you were mistaken, and that was I operating under incorrect information.

        So, ignore that bit about permissions. What you have is a very broken installation of Perl. You shouldn't have to tell Perl where to find Config. You should reinstall it; you shouldn't be applying hacks like using PERL5LIB.

Re: Can't locate Config.pm in @INC
by Anonymous Monk on Jun 22, 2022 at 08:28 UTC
    Are you on Linux? Use strace -e trace=%file perl -V to see which files Perl is trying to open and why it fails. There will be a lot of output, so make sure to read Writeup Formatting Tips and format it correctly using <code> tags.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11144917]
Approved by LanX
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found