How to recover from interrupted CPAN module installation? - perl

My computer crashed during a perl module installation using cpanm (I guess while installing Carp as a dependency of Moose). Now, when I try to use the modules I want to use, I get the following error:
user#linux:~$ ./script_using_moose.pl
Carp.pm did not return a true value at /usr/share/perl/5.14/diagnostics.pm line 185.
BEGIN failed--compilation aborted at /usr/share/perl/5.14/diagnostics.pm line 185.
Compilation failed in require at ./script_using_moose.pl line 5.
BEGIN failed--compilation aborted at ./script_using_moose.pl line 5.
user#linux:~$
And if I try to (re)install the package (using cpanm --reinstall or cpanm force) I get this other (similar) error:
user#linux:~$ sudo cpanm --force Moose
Carp.pm did not return a true value at /usr/local/share/perl/5.14.2/Parse/CPAN/Meta.pm line 6.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/Parse/CPAN/Meta.pm line 6.
Compilation failed in require at /loader/0x1692090/App/cpanminus/script.pm line 11.
BEGIN failed--compilation aborted at /loader/0x1692090/App/cpanminus/script.pm line 11.
Compilation failed in require at /usr/bin/cpanm line 2029.
BEGIN failed--compilation aborted at /usr/bin/cpanm line 2029.
user#linux:~$
How can I resume installation or reconfigure/reinstall the incomplete module?

For some reason, a couple of files were created but not written to, or truncated. These can be easily identified in the full installation log as those modules with an undef version number:
Checking dependencies from MYMETA.json ...
...
Checking if you have Task::Weaken 0 ... Yes (undef)
...
Checking if you have Devel::GlobalDestruction 0 ... Yes (undef)
Reinstalling the modules Task::Weaken, and Devel::GlobalDestruction should do the trick.

Related

Getting error while executing makeinfo on cygwin

While executing makeinfo on cygwin I am getting the following errors. I am using the perl version 5.32.1
23:16 Harshal:~> makeinfo
Can't locate if.pm in #INC (you may need to install the if module) (#INC contains: /usr/lib/texinfo /usr/share/texinfo/lib/Text-Unidecode/lib /usr/share/texinfo/lib/Unicode-EastAsianWidth/lib /usr/share/texinfo/lib/libintl-perl/lib /usr/share/texinfo /usr/share/texinfo /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.32 /usr/lib/perl5/vendor_perl/5.32/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.32 /usr/lib/perl5/5.32/x86_64-cygwin-threads /usr/share/perl5/5.32) at /usr/share/texinfo/Texinfo/Structuring.pm line 27.
BEGIN failed--compilation aborted at /usr/share/texinfo/Texinfo/Structuring.pm line 27.
Compilation failed in require at /usr/share/texinfo/Texinfo/Convert/Converter.pm line 32.
BEGIN failed--compilation aborted at /usr/share/texinfo/Texinfo/Convert/Converter.pm line 32.
Compilation failed in require at /usr/bin/makeinfo line 99.
BEGIN failed--compilation aborted at /usr/bin/makeinfo line 99.
If someone can provide some pointer on how to resolve this issue would be helpful
I tried updating the perl version. I tried commetting out the code on line num 27 in structuring.pm didn;t workout. I am not from software background but i need the above thing for some RISCV based toolchain update.
Any help woudl be really appreciated .
Something's wrong with your system. This is a file included in the perl-5.32.1-2 package. It should be found at
/usr/share/perl5/5.32/if.pm
Try reinstalling the perl package. If the file isn't missing, something's wrong with the permissions.

Unable to run latexindent macOS Monterey 12.0.1

I need to be able to run the command latexindent but I get this error every time:
Unknown PerlIO layer 'encoding' at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 21.
Unknown PerlIO layer "encoding" at /opt/homebrew/Cellar/perl/5.34.0/lib/perl5/5.34.0/open.pm line 126.
Unknown PerlIO layer "encoding" at /opt/homebrew/Cellar/perl/5.34.0/lib/perl5/5.34.0/open.pm line 134.
Unknown PerlIO layer "encoding" at /opt/homebrew/Cellar/perl/5.34.0/lib/perl5/5.34.0/open.pm line 135.
Attempt to reload PerlIO/encoding.pm aborted.
Compilation failed in require at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/FileExtension.pm line 20.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/FileExtension.pm line 20.
Compilation failed in require at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 29.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/texmf-dist/scripts/latexindent/LatexIndent/Document.pm line 29.
Compilation failed in require at /usr/local/texlive/2021/bin/universal-darwin/latexindent line 27.
BEGIN failed--compilation aborted at /usr/local/texlive/2021/bin/universal-darwin/latexindent line 27.
I installed MacTeX with Homebrew through this command brew install --cask mactex. When I type the command which latexindent it gives this /usr/local/texlive/2021/bin/universal-darwin/latexindent. I have Perl v5.34.0 and it is here /opt/homebrew/bin/perl.
How do I set the encoding for PerlIO?
I solved by installing latexindent via homebrew.
The command is brew install latexindent.
I'm on MacOS Monterey 12.4
Based on this question, I found a solution to my problem like this :
I deleted : ~/perl5, ~/.cpan, ~/.cpanm;
I restarted my computer;
Then I installed Log::Log4perl with the command cpan install Log::Log4perl. There it asked me if I wanted to choose automatic or
manual configuration mode. I chose the automatic mode;
Then I installed other modules based on this
post:
SQL::Statement, Text::CSV_XS,DBD::CSV, Log::Dispatch::File, cpan install YAML::Tiny, File::HomeDir, Unicode::GCString, Mac::SystemDirectory;
And finally the command latexindent --version gives me the version 3.9.1, 2021-03-21 and it works.

perl DBI installation fails alpine

I am trying to install DBI (after failing DBD) on alpine 3.12 and keep getting the errors below. I tried the most recent version of DBI and 1.628 which seems to be released right after Perl v5.16.3 (which I need to use). I updated Test::Simple, Test::More and Pod::Simple.
Errorlog (shortend):
cpanm https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.628.tar.gz
cpanm (App::cpanminus) 1.7044 on perl 5.016003 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1598444706.8
You have make /usr/bin/make
You have /usr/bin/wget
You have /usr/bin/tar: tar (GNU tar) 1.32
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
--> Working on https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.628.tar.gz
Fetching https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.628.tar.gz
-> OK
Unpacking DBI-1.628.tar.gz
Entering DBI-1.628
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (6.63_02)
Configuring DBI-1.628
Running Makefile.PL
Your perl was compiled with gcc (version 9.3.0), okay.
Creating test wrappers for DBD::Gofer:
t/zvg_01basics.t
t/zvg_02dbidrv.t
[...]
t/zvxgnp_85gofer.t
Checking if your kit is complete...
Looks good
I see you're using perl 5.016003 on x86_64-linux-thread-multi, okay.
Remember to actually *read* the README file!
Use 'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.
Writing Makefile for DBI
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 6.48 ... Yes (6.63_02)
Checking if you have Test::Simple 0.90 ... Yes (0.98)
Building and testing DBI-1.628
/opt/perl/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/lib/DBI
rm -f blib/lib/DBI/Changes.pm
cp Changes blib/lib/DBI/Changes.pm
[...]
# Failed test 'use DBI::DBD::SqlEngine;'
# at t/48dbi_dbd_sqlengine.t line 18.
# Tried to use 'DBI::DBD::SqlEngine'.
# Error: Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
# Compilation failed in require at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/DBD/SqlEngine.pm line 27.
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.
# Failed test 'use DBD::File;'
# at t/48dbi_dbd_sqlengine.t line 19.
# Tried to use 'DBD::File'.
# Error: Attempt to reload DBI/DBD/SqlEngine.pm aborted.
# Compilation failed in require at (eval 11) line 2.
# ...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
# BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/File.pm line 34.
# Compilation failed in require at (eval 9) line 2.
# BEGIN failed--compilation aborted at (eval 9) line 2.
install_driver(File) failed: Attempt to reload DBD/File.pm aborted.
Compilation failed in require at (eval 12) line 3.
at t/48dbi_dbd_sqlengine.t line 22.
# Tests were run but no plan was declared and done_testing() was not seen.
t/48dbi_dbd_sqlengine.t .........
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/3 subtests
# Failed test 'use DBD::File;'
# at t/49dbd_file.t line 18.
# Tried to use 'DBD::File'.
# Error: Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
# Compilation failed in require at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/DBD/SqlEngine.pm line 27.
# Compilation failed in require at (eval 9) line 2.
# ...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
# BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/File.pm line 34.
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.
install_driver(File) failed: Attempt to reload DBD/File.pm aborted.
Compilation failed in require at (eval 11) line 3.
at t/49dbd_file.t line 30.
# Tests were run but no plan was declared and done_testing() was not seen.
t/49dbd_file.t ..................
Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/2 subtests
Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
Compilation failed in require at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/DBD/SqlEngine.pm line 27.
Compilation failed in require at (eval 9) line 2.
...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/File.pm line 34.
Compilation failed in require at (eval 8) line 2.
...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/DBM.pm line 25.
Compilation failed in require at t/50dbm_simple.t line 7.
t/50dbm_simple.t ................
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
install_driver(DBM) failed: Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
Thanks for any insights.

strict.pm did not return a true value at (eval 1) line 2

I have a VPS with the following System installed:
CPU model : Common KVM processor
Number of cores : 1
CPU frequency : 2499.998 MHz
Total size of Disk : 30.0 GB (6.0 GB Used)
Total amount of Mem : 1995 MB (1043 MB Used)
Total amount of Swap : 0 MB (0 MB Used)
OS : Debian GNU/Linux 10
Arch : x86_64 (64 Bit)
Kernel : 4.19.0-8-amd64
with only Mailcow (dockerized) installed. I then wanted to install some packages like sudo and for some reason the following error pops up:
root#mx:~# aptitude upgrade
The following packages will be upgraded:
docker-ce docker-ce-cli
The following partially installed packages will be configured:
debconf
The following packages are RECOMMENDED but will NOT be installed:
aufs-tools cgroupfs-mount libltdl7 pigz
2 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/65.4 MB of archives. After unpacking 19.5 kB will be used.
Do you want to continue? [Y/n/?]
debconf: Perl may be unconfigured (strict.pm did not return a true value at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
) -- aborting
Setting up debconf (1.5.71) ...
strict.pm did not return a true value at /usr/share/debconf/frontend line 5.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 5.
dpkg: error processing package debconf (--configure):
installed debconf package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)
Specifically this error catched my attention:
debconf: Perl may be unconfigured (strict.pm did not return a true value at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
) -- aborting
I've been trying to fix this issue with no success at all.
Try #1:
perl -e 'use strict' returns this:
strict.pm did not return a true value at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
Try #2:
cd /var/cache/apt/archives, then dpkg -i perl_5.28.1-6_amd64.deb and dpkg -i perl-base_5.28.1-6_amd64.deb results in this:
root#mx:~# cd /var/cache/apt/archives
root#mx:/var/cache/apt/archives# dpkg -i perl-base_5.28.1-6_amd64.deb
(Reading database ... 40477 files and directories currently installed.)
Preparing to unpack perl-base_5.28.1-6_amd64.deb ...
Unpacking perl-base (5.28.1-6) over (5.28.1-6) ...
Setting up perl-base (5.28.1-6) ...
root#mx:/var/cache/apt/archives# dpkg -i perl_5.28.1-6_amd64.deb
Selecting previously unselected package perl.
(Reading database ... 40477 files and directories currently installed.)
Preparing to unpack perl_5.28.1-6_amd64.deb ...
Unpacking perl (5.28.1-6) over (5.28.1-6) ...
Setting up perl (5.28.1-6) ...
root#mx:/var/cache/apt/archives#
Try #3:
apt reinstall perl results in this:
root#mx:/var/cache/apt/archives# apt reinstall perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0 B/204 kB of archives.
After this operation, 0 B of additional disk space will be used.
debconf: Perl may be unconfigured (strict.pm did not return a true value at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
) -- aborting
Setting up debconf (1.5.71) ...
strict.pm did not return a true value at /usr/share/debconf/frontend line 5.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 5.
dpkg: error processing package debconf (--configure):
installed debconf package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)
root#mx:/var/cache/apt/archives#
Try #4:
Since perl5 isn't installed, I tried purging perl and reinstalling it with apt remove --purge perl && sudo apt install perl
Results are:
root#mx:/var/cache/apt/archives# apt remove --purge perl && sudo apt install perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
git-man libapt-pkg-perl libcurl3-gnutls libgdbm-compat4 libgdbm6 libperl5.28 patch perl-modules-5.28
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
apt-file* git* libcgi-fast-perl* libcgi-pm-perl* libclass-accessor-perl* libencode-locale-perl* liberror-perl* libexporter-tiny-perl* libfcgi-perl* libhtml-parser-perl* libhtml-tagset-perl*
libhttp-date-perl* libhttp-message-perl* libio-html-perl* libio-string-perl* liblist-moreutils-perl* liblwp-mediatypes-perl* libparse-debianchangelog-perl* libregexp-assemble-perl* libsub-name-perl*
libtimedate-perl* liburi-perl* perl*
0 upgraded, 0 newly installed, 23 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 39.4 MB disk space will be freed.
Do you want to continue? [Y/n]
debconf: Perl may be unconfigured (strict.pm did not return a true value at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
) -- aborting
Setting up debconf (1.5.71) ...
strict.pm did not return a true value at /usr/share/debconf/frontend line 5.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 5.
dpkg: error processing package debconf (--configure):
installed debconf package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)
root#mx:/var/cache/apt/archives#
Try #5:
perl -V returns this:
root#mx:/usr/share/perl/5.28.1# perl -V
strict.pm did not return a true value at /usr/lib/x86_64-linux-gnu/perl/5.28/Config.pm line 9.
BEGIN failed--compilation aborted at /usr/lib/x86_64-linux-gnu/perl/5.28/Config.pm line 9.
Compilation failed in require.
BEGIN failed--compilation aborted.
About strict.pm, it seems to be localted in /usr/share/perl/5.28.1/strict.pm and contains a massive long line with the following:
^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^#^ (and so on ..)
"fixed" it by simply replacing it with
1;
__END__
but now the following error occours:
debconf: Perl may be unconfigured (IO/File.pm did not return a true value at /usr/share/perl/5.28/FileHandle.pm line 9.
and that file, IO/File.pm, seems to not exist - adding it manually didn't help.
Try #6:
With the help of #ikegami (comments), strict.pm has been fixed, yet the following files seem broken still (specifically IO/File.pm):
Setting up debconf (1.5.71) ...
IO/File.pm did not return a true value at /usr/share/perl/5.28/FileHandle.pm line 9.
Compilation failed in require at /usr/share/perl5/Debconf/Template.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template.pm line 8.
Compilation failed in require at /usr/share/perl5/Debconf/Question.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question.pm line 8.
Compilation failed in require at /usr/share/perl5/Debconf/Config.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10.
Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7.
Compilation failed in require at /usr/share/debconf/frontend line 7.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 7.
dpkg: error processing package debconf (--configure):
installed debconf package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
debconf
E: Sub-process /usr/bin/dpkg returned an error code (1)
Info #1:
root#mx:/usr/share/perl/5.28# find /usr/share/perl -name '*.pm' -exec perl
-0777ne'print "$ARGV\n" if /\0/' {} +
/usr/share/perl/5.28.1/Net/FTP/A.pm
/usr/share/perl/5.28.1/Net/FTP/I.pm
/usr/share/perl/5.28.1/Net/FTP/L.pm
/usr/share/perl/5.28.1/Net/FTP/E.pm
/usr/share/perl/5.28.1/Net/FTP/dataconn.pm
/usr/share/perl/5.28.1/Net/FTP.pm
/usr/share/perl/5.28.1/Net/SMTP.pm
/usr/share/perl/5.28.1/Net/hostent.pm
/usr/share/perl/5.28.1/Net/Time.pm
/usr/share/perl/5.28.1/utf8.pm
/usr/share/perl/5.28.1/Pod/Html.pm
/usr/share/perl/5.28.1/Pod/Functions.pm
/usr/share/perl/5.28.1/Pod/Find.pm
/usr/share/perl/5.28.1/sigtrap.pm
/usr/share/perl/5.28.1/perlfaq.pm
/usr/share/perl/5.28.1/subs.pm
/usr/share/perl/5.28.1/IO/Socket/IP.pm
/usr/share/perl/5.28.1/IO/Compress/Zlib/Constants.pm
/usr/share/perl/5.28.1/IO/Compress/Zlib/Extra.pm
/usr/share/perl/5.28.1/IO/Compress/Gzip/Constants.pm
/usr/share/perl/5.28.1/IO/Compress/Gzip.pm
/usr/share/perl/5.28.1/IO/Compress/RawDeflate.pm
/usr/share/perl/5.28.1/IO/Uncompress/RawInflate.pm
/usr/share/perl/5.28.1/IO/Uncompress/Adapter/Identity.pm
/usr/share/perl/5.28.1/IO/Uncompress/Adapter/Bunzip2.pm
/usr/share/perl/5.28.1/IO/Uncompress/Base.pm
/usr/share/perl/5.28.1/IO/Uncompress/Unzip.pm
/usr/share/perl/5.28.1/IO/Uncompress/Bunzip2.pm
/usr/share/perl/5.28.1/vmsish.pm
/usr/share/perl/5.28.1/Locale/Codes/LangFam_Codes.pm
/usr/share/perl/5.28.1/Locale/Codes/LangVar.pm
/usr/share/perl/5.28.1/Locale/Codes/LangExt_Retired.pm
/usr/share/perl/5.28.1/Locale/Codes/LangFam_Retired.pm
/usr/share/perl/5.28.1/Locale/Codes/LangFam.pm
/usr/share/perl/5.28.1/Test2/API/Stack.pm
/usr/share/perl/5.28.1/Test2/Event.pm
/usr/share/perl/5.28.1/Test2/API.pm
/usr/share/perl/5.28.1/Test2/Event/Waiting.pm
/usr/share/perl/5.28.1/Test2/EventFacet/Info.pm
/usr/share/perl/5.28.1/Test2/EventFacet/Amnesty.pm
/usr/share/perl/5.28.1/Test2/EventFacet/About.pm
/usr/share/perl/5.28.1/Test2/EventFacet/Assert.pm
/usr/share/perl/5.28.1/Test2/EventFacet/Hub.pm
/usr/share/perl/5.28.1/Test2/EventFacet/Control.pm
/usr/share/perl/5.28.1/Test2/EventFacet/Error.pm
/usr/share/perl/5.28.1/overload/numbers.pm
/usr/share/perl/5.28.1/sort.pm
/usr/share/perl/5.28.1/parent.pm
Info #2:
root#mx: find / -name "File.pm"
/usr/share/perl/5.28.1/Archive/Tar/File.pm
/usr/share/perl/5.28.1/TAP/Parser/SourceHandler/File.pm
/usr/share/perl/5.28.1/TAP/Formatter/File.pm
/usr/share/perl/5.28.1/Tie/File.pm
/usr/share/perl5/Debconf/DbDriver/File.pm
/usr/lib/x86_64-linux-gnu/perl/5.28.1/IO/File.pm
/usr/lib/x86_64-linux-gnu/perl-base/IO/File.pm
Issuing the following commands should fix enough corrupted files to allow you to reinstall Perl using apt:
>/usr/share/perl/5.28.1/utf8.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/lib/utf8.pm
>/usr/share/perl/5.28.1/subs.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/lib/subs.pm
>/usr/share/perl/5.28.1/IO/Socket/IP.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Socket-IP/lib/IO/Socket/IP.pm
>/usr/share/perl/5.28.1/IO/Compress/Zlib/Constants.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm
>/usr/share/perl/5.28.1/IO/Compress/Zlib/Extra.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm
>/usr/share/perl/5.28.1/IO/Compress/Gzip/Constants.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm
>/usr/share/perl/5.28.1/IO/Compress/Gzip.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Compress/Gzip.pm
>/usr/share/perl/5.28.1/IO/Compress/RawDeflate.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm
>/usr/share/perl/5.28.1/IO/Uncompress/RawInflate.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm
>/usr/share/perl/5.28.1/IO/Uncompress/Adapter/Identity.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm
>/usr/share/perl/5.28.1/IO/Uncompress/Adapter/Bunzip2.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm
>/usr/share/perl/5.28.1/IO/Uncompress/Base.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Uncompress/Base.pm
>/usr/share/perl/5.28.1/IO/Uncompress/Unzip.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm
>/usr/share/perl/5.28.1/IO/Uncompress/Bunzip2.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm
>/usr/share/perl/5.28.1/overload/numbers.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/lib/overload/numbers.pm
>/usr/share/perl/5.28.1/sort.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/lib/sort.pm
>/usr/share/perl/5.28.1/parent.pm curl https://raw.githubusercontent.com/Perl/perl5/v5.28.1/cpan/parent/lib/parent.pm

Why do I get "version (5.12.2) doesn't match executable version" with Perl's PAR?

When I run the following to create an executable out of my Perl script:
pp -o process_target_mode_data Process_Target_Mode_Data.pl
I get the following error output:
Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation failed in require at -e line 459.
/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parleNrP2Xi' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172, <DATA> line 1.
Could someone explain to me what is going on and how I can resolve this problem?
Info brian d foy requested:
[bash-3.2][Neil#willy]$ which pp
/home/Neil/ActivePerl-5.12/site/bin/pp
[bash-3.2][Neil#willy]$ /home/Neil/ActivePerl-5.12/site/bin/pp -o process_target_mode_data Process_Target_Mode_Data.pl
Perl lib version (5.12.2) doesn't match executable version (v5.12.0) at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Errno.pm line 8.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/File/Temp.pm line 148.
Compilation failed in require at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
BEGIN failed--compilation aborted at /home/Neil/ActivePerl-5.12/lib/Archive/Zip.pm line 14.
Compilation failed in require at -e line 459.
/home/Neil/ActivePerl-5.12/site/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file 'parludZfldz' at /home/Neil/ActivePerl-5.12/site/lib/PAR/Packer.pm line 1172, line 1.
[bash-3.2][Neil#willy]$
[bash-3.2][Neil#willy]$ /home/Neil/ActivePerl-5.12/bin/cpan -l | grep PAR
PAR 1.002
PAR::Dist 0.47
PAR::Heavy 0.12
PAR::Filter 0.03
PAR::SetupTemp 1.002
PAR::SetupProgname 1.002
PAR::Packer 1.006
PAR::StrippedPARL::Dynamic 0.958
PAR::StrippedPARL::Static 0.958
PAR::StrippedPARL::Base 0.975
PAR::Filter::Bytecode undef
PAR::Filter::Bleach undef
PAR::Filter::Obfuscate undef
PAR::Filter::PatchContent undef
PAR::Filter::PodStrip undef
App::Packer::PAR 0.91
Perl lib version (5.12.2) doesn't match executable version (v5.12.0)
Some parts of your Perl installation are at a different version than others. More specifically, if you look at /home/Neil/ActivePerl-5.12/lib/Config.pm line 50, you will see that there is an explicit comparison of the version of Perl being executed (which is 5.12.0) to the version of the Config.pm library being used (5.12.2).
If you perform a new installation of ActivePerl 5.12.2 (to bring all components up to the same version), this error should go away.
I had same issue. I installed PAR::Packer from Activestate Perl Package Manager (PPM). As mentioned above in one of the replies, there is version mismatch between the perl and pp binaries. Here's how I fixed it:
Uninstall PAR-Packer from PPM.
Open DOS command line.
Run cpan install PAR::Packer
This will download, compile, and install the package from CPAN. MinGW compiler toolchain will be downloaded as well, if needed. The whole process may take a while on slower cpus.
Find the location of that pp, then figure out its version. I bet it's left over from an earlier installation. Ensure that you have PAR for your new version of Perl.
You can also try specifying the location of the particular pp you want to use so you know exactly what one you are using:
$ /full/path/to/5.12.2/pp ...
Go to the perl/lib/Config.pm and changed the condition in the lines:
die "$0: Perl lib version (5.32.0) doesn't match executable '$^X' version ($])" unless $^V;
to
die "$1: Perl lib version (5.32.1) doesn't match executable '$^X' version ($])" unless $^V;
and the next line
$^V eq 5.32.0 or die sprintf "%s: Perl lib version (5.32.0) doesn't match executable '$^X' version (%vd)", $0, $^V;
to
$^V eq 5.32.1 or die sprintf "%s: Perl lib version (5.32.1) doesn't match executable '$^X' version (%vd)", $0, $^V;
this worked for me, at least it won't complain... yes, i know, PERL and Python are f***d up.