Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

I am Getting an Error like this Can't locate pathUtil.pm in @INC

by Anonymous Monk
on Nov 21, 2022 at 12:26 UTC ( #11148288=perlquestion: print w/replies, xml ) Need Help??

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

I am executing one of the Perl file in "Linux OS" I am getting an error like this:

Can't locate pathUtil.pm in @INC (you may need to install the pathUtil + module) (@INC contains: /usr/local/lib/perl5/site_perl/5.36.0/x86_64 +-linux /usr/local/lib/perl5/site_perl/5.36.0 /usr/local/lib/perl5/5.3 +6.0/x86_64-linux /usr/local/lib/perl5/5.36.0 /usr/local/lib/perl5/sit +e_perl) at pod_check.pl line 14. BEGIN failed--compilation aborted at pod_check.pl line 14 (#1) (F) You said to do (or require, or use) a file that couldn't be fo +und. Perl looks for the file in all the locations mentioned in @INC, un +less the file name included the full path to the file. Perhaps you nee +d to set the PERL5LIB or PERL5OPT environment variable to say where +the extra library is, or maybe the script needs to add the library nam +e to @INC. Or maybe you just misspelled the name of the file. See "require" in perlfunc and lib. Uncaught exception from user code: Can't locate pathUtil.pm in @INC (you may need to install the +pathUtil module) (@INC contains: /usr/local/lib/perl5/site_perl/5.36. +0/x86_64-linux /usr/local/lib/perl5/site_perl/5.36.0 /usr/local/lib/p +erl5/5.36.0/x86_64-linux /usr/local/lib/perl5/5.36.0 /usr/local/lib/p +erl5/site_perl) at pod_check.pl line 14. BEGIN failed--compilation aborted at pod_check.pl line 14.

I have found the module like Path::Util.pm. That I have Installed But the error is not resolved. I think it is asking for the combined module like pathUtil.pm, That module I haven't found the Mcpan.org also

So can anyone help me to solve this issue?

Replies are listed 'Best First'.
Re: I am Getting an Error like this Can't locate pathUtil.pm in @INC
by Corion (Patriarch) on Nov 21, 2022 at 12:35 UTC

    What is this program pod_check.pl ? There are maybe instructions on how to install the missing file pathUtil.pm. The file does not exist in CPAN, so it is likely a custom module that somebody in your organization wrote.

Re: I am Getting an Error like this Can't locate pathUtil.pm in @INC
by marto (Cardinal) on Nov 21, 2022 at 12:47 UTC
Re: I am Getting an Error like this Can't locate pathUtil.pm in @INC
by kcott (Archbishop) on Nov 21, 2022 at 17:32 UTC
    "So can anyone help me to solve this issue?"

    As others have already indicated, you haven't provided sufficient information for us to determine the problem. Here's some things you can do:

    • Check for pathUtil.pm in each of the five directories that @INC contains. This will confirm its absence; however, if found, check that it hasn't got permissions that prevent Perl from reading it. Show us the output from:
      for i in `perl -e 'print "@INC"'`; do ls -l $i/pathUtil.pm; done
    • Show us the values of environment variables PERL5LIB & PERL5OPT; if there's no value, still include that information.
    • Show us the output from: perl -V
    • Tell us how you installed pathUtil.pm: manually from a tarball; via a package manager; with a utility such as cpan, cpanm, etc.
    • Show us the first 15-20 lines of pod_check.pl. We'll want to see any shebang line; what pragmata you're using; and, how you're attempting to load pathUtil.pm (if that includes a larger construct, such as a BEGIN block, include that in its entirety).
    • Tell us how you're running pod_check.pl. This could be simple like ./pod_check.pl; more involved like /path/to/perl options pod_check.pl; or possibly even using some launcher application.
    • Tell us what operating system you're using. You said Linux, but not which one: RedHat? Debian? openSUSE? ...? The O/S version may be important, so include that also.

    We may want further details but the above would provide a good starting point for initial investigations. Please ensure all code, data, and output, are enclosed in <code>...</code> tags.

    Also note that gathering this sort of information, as part of any troubleshooting exercise, will (surprisingly) often highlight the problem for you. For instance, "Oh look, I'm installing with /path/to/X/bin/cpan but running with /path/to/Y/bin/perl. Oops!".

    — Ken

Re: I am Getting an Error like this Can't locate pathUtil.pm in @INC
by ikegami (Patriarch) on Nov 21, 2022 at 22:57 UTC

    Is there a pathUtil.pm in the same dir as pod_check.pl? If so, the script is missing

    use FindBin qw( $RealBin ); use lib $RealBin;

      This solution has helped me. Thanks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2023-02-06 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (36 votes). Check out past polls.

    Notices?