Bug#927031: perl: unfeasible default search path
Winfried Boxleitner
winfried.boxleitner at ait.ac.at
Sat Apr 13 22:55:42 BST 2019
Package: perl
Version: 5.28.1-6
Severity: important
Dear Maintainer,
backuppc, a perl program does not start
(related bugs: #855617 and #856504)
error message:
"Can't locate strict.pm: /usr/local/lib/x86_64-linux-gnu/perl/5.28.1/strict.pm: Permission denied at /usr/share/backuppc/lib/realindex.cgi line 48"
searching the internet (see: https://stackoverflow.com/questions/2526804/how-is-perls-inc-constructed-aka-what-are-all-the-ways-of-affecting-where-pe)
showed the reason: the search path included directories, which did not
exist or were not searchable by user "backuppc".
searching the include path shows:
perl -e 'print join "\n", @INC'
>> /etc/perl
>> /usr/local/lib/x86_64-linux-gnu/perl/5.28.1
>> /usr/local/share/perl/5.28.1
>> /usr/lib/x86_64-linux-gnu/perl5/5.28
>> /usr/share/perl5
>> /usr/lib/x86_64-linux-gnu/perl/5.28
>> /usr/share/perl/5.28
>> /usr/local/lib/site_perl
>> /usr/lib/x86_64-linux-gnu/perl-base
If one of them does NOT exist, the error above is issued. it is
NOT sufficient, that the directory exists, it must be searchable
by the user starting the perl script. The directories under /usr/local
may be empty, but MUST exist. This is especially annoying because
the search path contains versioned directories, eg. .../perl/5.28.1/.
Workaround:
the include path @INC is a compiled-in default, but can be prepended
with a list of directories by setting the env-variable PERL5LIB.
therefore list all system dirs, so the ones under /usr/local are NEVER touched
PERL5LIB=/etc/perl:/usr/lib/x86_64-linux-gnu/perl5/5.28:/usr/share/perl5:/usr/lib/x86_64-linux-gnu/perl/5.28:/usr/share/perl/5.28:/usr/lib/x86_64-linux-gnu/perl-base
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-4-amd64 (SMP w/16 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages perl depends on:
ii dpkg 1.19.6
ii libperl5.28 5.28.1-6
ii perl-base 5.28.1-6
ii perl-modules-5.28 5.28.1-6
Versions of packages perl recommends:
ii netbase 5.6
Versions of packages perl suggests:
pn libb-debug-perl <none>
pn liblocale-codes-perl <none>
pn libterm-readline-gnu-perl | libterm-readline-perl-perl <none>
ii make 4.2.1-1.2
ii perl-doc 5.28.1-6
-- debconf-show failed
Version of backuppc:
ii backuppc 3.3.2-2
upgrade to testing (=buster): 2 months ago
More information about the Perl-maintainers
mailing list