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

Sean Darcy seandarcy2 at gmail.com
Wed Apr 2 17:28:33 UTC 2014


On 04/01/2014 02:57 PM, Sean Darcy wrote:
> On 04/01/2014 02:34 PM, Sean Darcy wrote:
>> Just upgraded from F19 to F20. perl-5.18.2-289.fc20.x86_64
>>
>> As root:
>>
>> # perl -V
>> Summary of my perl5 (revision 5 version 18 subversion 2) configuration:
>>
>>    Platform:
>>      osname=linux, osvers=3.11.9-200.fc19.x86_64,
>> archname=x86_64-linux-thread-multi
>> ..........
>>    Built under linux
>>    Compiled at Jan  7 2014 14:47:21
>>    %ENV:
>>
>> PERL5LIB="/root/perl5/lib/perl5/x86_64-linux-thread-multi:/root/perl5/lib/perl5"
>>
>>
>>      PERL_LOCAL_LIB_ROOT="/root/perl5"
>>      PERL_MB_OPT="--install_base /root/perl5"
>>      PERL_MM_OPT="INSTALL_BASE=/root/perl5"
>>    @INC:
>>      /root/perl5/lib/perl5/x86_64-linux-thread-multi
>>      /root/perl5/lib/perl5
>>      /usr/local/lib64/perl5
>>      /usr/local/share/perl5
>>      /usr/lib64/perl5/vendor_perl
>>      /usr/share/perl5/vendor_perl
>>      /usr/lib64/perl5
>>      /usr/share/perl5
>>
>> BTW, there is no /root/perl5 folder.
>>
>> # perl -e 'use strict; print map {"$_ => $INC{$_}\n"} keys %I'
>> 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.
>>
>> $ ls -l /usr/share/perl5/strict.pm
>> -rwxr-xr-x. 1 root root 3933 Jan  7 09:48 /usr/share/perl5/strict.pm
>>
>> $ perl -e 'print join "\n", @INC'
>> /root/perl5/lib/perl5/x86_64-linux-thread-multi
>> /root/perl5/lib/perl5
>> /usr/local/lib64/perl5
>> /usr/local/share/perl5
>> /usr/lib64/perl5/vendor_perl
>> /usr/share/perl5/vendor_perl
>> /usr/lib64/perl5
>> /usr/share/perl5
>>
>>
>> This works as root. And used to work as a user in F19. And works on
>> another F19 machine.
>>
>> Any help appreciated.
>>
>> sean
>>
>
> And the user can read strict.pm:
>
> $ cat /usr/share/perl5/strict.pm
> package strict;
>
> $strict::VERSION = "1.07";
> ...............
>
>
> What's going wrong here?
>
> sean
>

Got an answer:

The problem is that the module search behavior changed from 5.16 (F19) 
to 5.18 (F20).  Now perl will stop looking for modules if any prior 
folder is not allowed. Before PERL5LIB extended @INC.  Now if it 
includes /root. for instance, any module search by a non-root user will 
fail. Each non-root user needs to have PERL5LIB referring only to 
folders where it has read permission.

Whew. Figured this out with the great assistance of the Perl Monks.



More information about the users mailing list