Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Issue with @INC

by dave_the_m (Monsignor)
on Oct 14, 2019 at 18:16 UTC ( [id://11107444]=note: print w/replies, xml ) Need Help??


in reply to Issue with @INC

Something in your INC path is missing the correct permissions for your user. For security reasons perl stops scanning @INC at that point rather than processing any remaining directories. So you'll most likely find that strict.pm is indeed installed, but permissions have been screwed. This often happens when the PERL5LIB env var is set and is pointing to somewhere weird like /root/lib

Dave.

Replies are listed 'Best First'.
Re^2: Issue with @INC
by sidmuchrock (Novice) on Oct 14, 2019 at 18:43 UTC

    Oh yes, you're entirely right. I tested with

    [SiDMBP2:~] urinine% perl dog.pl Can't locate feature.pm: Permission denied at dog.pl line 1. BEGIN failed--compilation aborted at dog.pl line 1. [SiDMBP2:~] urinine% sudo perl dog.pl Hello World Wednesday

    So it IS permissions. Okay what's the issue:

    [SiDMBP2:~] urinine% perl -e 'print(join("\n", @INC))' | xargs ls -ld ls: /Library/Perl/Updates/5.18.4: Permission denied ls: /Network/Library/Perl/5.18: No such file or directory ls: /Network/Library/Perl/5.18/darwin-thread-multi-2level: No such fil +e or directory drwxr-xr-x+ 55 urinine staff 1760 Oct 14 14:32 . drwxr-xr-x 25 root wheel 800 Oct 14 11:08 /Library/Perl/5.18 drwxr-xr-x 11 root wheel 352 Oct 14 11:08 /Library/Perl/5.18/d +arwin-thread-multi-2level drwxr-xr-x 130 root wheel 4160 Jul 24 08:26 /System/Library/Perl +/5.18 drwxr-xr-x 56 root wheel 1792 Jul 24 08:26 /System/Library/Perl +/5.18/darwin-thread-multi-2level drwxr-xr-x 109 root wheel 3488 Aug 17 2018 /System/Library/Perl +/Extras/5.18 drwxr-xr-x 72 root wheel 2304 Sep 21 2018 /System/Library/Perl +/Extras/5.18/darwin-thread-multi-2level

    So what's in that first directory

    [SiDMBP2:/Library/Perl] urinine% sudo ls -l /Library/Perl/Updates/5.18 +.4 total 0 drwx------ 3 root wheel 96 Oct 14 11:03 darwin-thread-multi-2level [SiDMBP2:/Library/Perl] urinine% sudo ls -l /Library/Perl/Updates/5.18 +.4/darwin-thread-multi-2level total 16 -rw------- 1 root wheel 7027 Oct 14 11:08 perllocal.pod

    Yep. Can't access those. So can I pull that out of my @INC somehow, or should I just blast some ugly overblown permissions over the directories?

      Well I'm not familiar with macs, but assuming all those paths are hard-coded into your perl binary (you can check with perl -V) then it seems most likely that the permissions on the directory is the thing needing fixing.

      Dave.

      Those directories hold the installed Perl system and should be 0755 for directories and 0644 for files. I believe that chown a+rX -R `perl -e 'print(join("\n", @INC))'` at a root prompt should fix it. The root cause was probably a bad umask value while updating Perl modules.

      Those permissions are not overblown at all — most of the system should be accessible to all users.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-19 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found