Updated to F20, now perl can't find installed modules

Garry T. Williams gtwilliams at gmail.com
Tue Apr 1 23:54:56 UTC 2014


On 4-1-14 14:34:22 Sean Darcy wrote:
> # perl -e 'use strict; print map {"$_ => $INC{$_}\n"} keys %I'
> strict.pm => /usr/share/perl5/strict.pm

OK, I'll bite and copy/paste what you wrote.

    # perl -e 'use strict; print map {"$_ => $INC{$_}\n"} keys %I'
    Global symbol "%I" requires explicit package name at -e line 1.
    Execution of -e aborted due to compilation errors.
    #

Hmmm.  Maybe you didn't copy and paste...

    # perl -e 'use strict; print map {"$_ => $INC{$_}\n"} keys %INC'
    strict.pm => /usr/share/perl5/strict.pm
    #

> As a user:
> 
> $ perl -e 'use strict; print "ok"'
> Can't locate strict.pm:   Permission denied at -e line 1.
> BEGIN failed--compilation aborted at -e line 1.

    $ perl -le 'use strict; print "ok"'
    ok
    $

> $ ls -l /usr/share/perl5/strict.pm
> -rwxr-xr-x. 1 root root 3933 Jan  7 09:48 /usr/share/perl5/strict.pm

Your installation is broken.  This file (and all Perl module files)
should have 0644 permissions -- not execute.

    $ ls -l /usr/share/perl5/strict.pm
    -rw-r--r--. 1 root root 3933 Jan  7 09:48 /usr/share/perl5/strict.pm
    $

The error message you encountered may be because of you not having
access to an intermediate directory in the path to strict.pm.  You
should check that:

    $ for d in /usr /usr/share /usr/share/perl5;do ls -ld $d;done
    drwxr-xr-x. 12 root root 4096 Dec 21 11:13 /usr/
    drwxr-xr-x. 288 root root 12288 Mar 28 15:24 /usr/share/
    drwxr-xr-x. 49 root root 4096 Jan 11 17:59 /usr/share/perl5/
    $

Anyway, since one thing in your installation is hosed, you probably
should reinstall perl to get the correct permissions set on its files.

I would be wondering how I managed to do that to the file, though.
The rpm -V command /might/ be of help to you.

On 4-1-14 14:57:13 Sean Darcy wrote:
> On 04/01/2014 02:34 PM, Sean Darcy wrote:
> And the user can read strict.pm:
> 
> $ cat /usr/share/perl5/strict.pm
> package strict;
> 
> $strict::VERSION = "1.07";
> ...............
> 
> 
> What's going wrong here?

Hmmm.  Any AVCs?

-- 
Garry T. Williams



More information about the users mailing list