Ken Heard <kensli...@teksavvy.com> writes: > At the end of a package update and upgrade today of Stretch the > following messages appeared. > > apt-listchanges: Mailing root: apt-listchanges: news for SOL > debconf: Perl may be unconfigured (Can't locate strict.pm: > /usr/local/lib/x86_64-linux-gnu/perl/5.22.2/strict.pm: Permission > denied at (eval 1) line2. > BEGIN failed--compilation aborted at (eval 1) line 2.) -- aborting > (Reading database ... 76727 files and directories currently installed.) > Preparing to unpack .../libapt-pkg5.0_1.3~rc2_amd64.deb ... > Unpacking libapt-pkg5.0:amd64 (1.3~rc2) over (1.3~rc1) ... > Setting up libapt-pkg5.0:amd64 (1.3~rc2) > (Reading database ... 76727 files and directories currently installed.) > Preparing to unpack .../libapt-pkg5.0_1.3~rc2_amd64.deb ... > Unpacking libapt-pkg5.0:amd64 (1.3~rc2) over (1.3~rc1) ... > Can't locate strict.pm: > /usr/local/lib/x86_64-linux-gnu/perl/5.22.2/strict.pm: Permission > denied at /usr/bin/deb-systemd-invoke line 52. > BEGIN failed--compilation aborted at /usr/bin/deb-systemd-invoke line 52 > . > dpkg: warning: subprocess old pre-removal script returned error exit > status 13 > dpkg: trying script from the new package instead ... > Can't locate strict.pm: Permission denied at > /usr/bin/deb-systemd-invoke line 52. > BEGIN failed--compilation aborted at /usr/bin/deb-systemd-invoke line 52 > . > dpkg: error processing archive > /tmp/apt-dpkg-install-GpvFkF/1-apt_1.3rc2_amd64.deb (--unpack): > subprocess new pre-removal script returned error exit status 13. > Can't locate strict.pm: > /usr/local/lib/x86_64-linux-gnu/perl/5.22.2/strict.pm: Permission > denied at /usr/bin/deb-systemd- helper line 83. > BEGIN failed--compilation aborted at /usr/bin/deb-systemd- helper line 8 > 3. > Can't locate strict.pm: > /usr/local/lib/x86_64-linux-gnu/perl/5.22.2/strict.pm: Permission > denied at /usr/bin/deb-systemd- helper line 83. > BEGIN failed--compilation aborted at /usr/bin/deb-systemd- helper line 8 > 3. > Can't locate strict.pm: > /usr/local/lib/x86_64-linux-gnu/perl/5.22.2/strict.pm: Permission > denied at /usr/bin/deb-systemd-helper line 83. > BEGIN failed--compilation aborted at /usr/bin/deb-systemd- helper line 8 > 3. > Can't locate strict.pm: > /usr/local/lib/x86_64-linux-gnu/perl/5.22.2/strict.pm: Permission > denied at /usr/bin/deb-systemd-invoke line 52. > BEGIN failed--compilation aborted at /usr/bin/deb-systemd-invoke line 52 > . > Errors were encountered while processing: > /tmp/apt-dpkg-install-GpvFkF/1-apt_1.3rc2_amd64.deb > E: Sub-process /usr/bin/dpkg/ returned an error code (1) >
Looks like you have a local (broken) perl installation in /usr/local that is interfering with the /usr/bin/deb-systemd-helper. deb-systemd-helper has a shebang line of #!/usr/bin/env perl, which is picking up the first perl available in $PATH, which is /usr/local/bin/perl in your case. Remove /usr/local/bin from your PATH and try again. If you have the PERLLIB or PERL5LIB environment variables set, unset them as well. # export PATH=/usr/bin:/usr/sbin:/bin:/sbin # unset PERLLIB # unset PERL5LIB # apt, etc... If this fixes your problem, consider reporting it as a bug on the init-system-helpers package. The deb-systemd-invoke and deb-systemd-helper scripts should be using the #!/usr/bin/perl shebang to always use the system perl. > <snip> -- regards, kushal