Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

How to fix Perl Installation after system upgrade

by monsignor (Acolyte)
on Nov 03, 2022 at 07:51 UTC ( #11147928=perlquestion: print w/replies, xml ) Need Help??

monsignor has asked for the wisdom of the Perl Monks concerning the following question:

Please pardon this humble neophyte, but I am having trouble getting perl running again after I upgraded my linux Mint installation from 20.3 to 21.

When I try to run perlbrew or a perl script I get these errors:

$ perlbrew ListUtil.c: loadable library and perl binaries are mismatched (got han +dshake key 0xcd00080, needed 0xeb00080) $ perl ListUtil.c: loadable library and perl binaries are mismatched (got han +dshake key 0xcd00080, needed 0xeb00080)

I belive this might be complicated because IIUC perl is used as "glue" to bind together some system processes.

Any assistance would be much appreciated.

P.S.: Not sure if it's relevant, but this is a list of all installed modules that contain the word perl:
i A libalgorithm-c3-perl - Perl modu +le for merging hierarchies using the C3 algorithm i A libaliased-perl - Perl modu +le to provide aliases of class names i libapt-pkg-perl - Perl inte +rface to libapt-pkg i libarchive-zip-perl - Perl modu +le for manipulation of ZIP archives i libauthen-sasl-perl - Authen::S +ASL - SASL Authentication framework i libb-hooks-endofscope-perl - module fo +r executing code after a scope finished compilation i libb-hooks-op-check-perl - Perl wrap +per for OP check callbacks i libcairo-gobject-perl - integrate + Cairo into the Glib type system in Perl i libcairo-perl - Perl inte +rface to the Cairo graphics library i libcapture-tiny-perl - module to + capture STDOUT and STDERR i libcgi-fast-perl - CGI subcl +ass for work with FCGI i libcgi-pm-perl - module fo +r Common Gateway Interface applications i A libclass-c3-perl - pragma fo +r using the C3 method resolution order i A libclass-c3-xs-perl - Perl modu +le to accelerate Class::C3 i A libclass-data-inheritable-perl - Perl modu +le to create accessors to class data i A libclass-load-perl - module fo +r loading modules by name i A libclass-load-xs-perl - XS implem +entation of parts of Class::Load i libclass-method-modifiers-perl - Perl modu +le providing method modifiers i A libclass-tiny-perl - minimalis +t class construction module for Perl i libclass-xsaccessor-perl - Perl modu +le providing fast XS accessors i libclone-perl - module fo +r recursively copying Perl datatypes i A libcommon-sense-perl - module th +at implements some sane defaults for Perl programs i A libconfig-tiny-perl - Read/Writ +e .ini style files with as little code as possible i A libconst-fast-perl - facility +for creating read-only scalars, arrays, and hashes i A libconvert-binhex-perl - Perl5 mod +ule for extracting data from macintosh BinHex files i libcpanel-json-xs-perl - module fo +r fast and correct serialising to JSON i A libdata-dpath-perl - DPath is +like XPath but for Perl data structures i libdata-dump-perl - Perl modu +le to help dump data structures i A libdata-messagepack-perl - MessagePa +ck serializing/deserializing i A libdata-optlist-perl - module to + parse and validate simple name/value option pairs i A libdata-validate-domain-perl - perl doma +in name validation functions i A libdata-validate-ip-perl - Perl modu +le for IP validation i A libdata-validate-uri-perl - common UR +I validation methods i A libdate-manip-perl - module fo +r manipulating dates i libdevel-callchecker-perl - custom op + checking attached to subroutines i A libdevel-caller-perl - module pr +oviding enhanced caller() support i A libdevel-globaldestruction-perl - module to + expose the flag that marks global destruction i A libdevel-lexalias-perl - Perl modu +le that provides alias lexical variables i A libdevel-overloadinfo-perl - module to + introspect overloaded operators i A libdevel-partialdump-perl - Perl modu +le to dump subroutine parameters concisely i libdevel-size-perl - Perl exte +nsion for finding the memory usage of Perl variables i A libdevel-stacktrace-perl - Perl modu +le containing stack trace and related objects i libdigest-hmac-perl - module fo +r creating standard message integrity checks i A libdist-checkconflicts-perl - module fo +r declaring version conflicts for a distribution i libdpkg-perl - Dpkg perl + modules i libdynaloader-functions-perl - deconstru +cted dynamic C library loading i A libemail-abstract-perl - unified i +nterface to mail representations i A libemail-address-xs-perl - Perl libr +ary for RFC 5322 address/group parsing and formatting i A libemail-date-format-perl - Module to + generate RFC-2822-valid date strings i A libemail-messageid-perl - Perl libr +ary for unique mail Message-ID generation i A libemail-mime-contenttype-perl - Perl modu +le to parse a MIME Content-Type header i A libemail-mime-encodings-perl - unified i +nterface to MIME encoding and decoding i libemail-mime-perl - module fo +r simple MIME message parsing i libemail-sender-perl - Perl modu +le for sending email i libemail-simple-perl - module to + parse RFC2822 headers and message format i libemail-valid-perl - Perl modu +le for checking the validity of Internet email addresse i libencode-locale-perl - utility t +o determine the locale encoding i A libencode-perl - module pr +oviding interfaces between Perl's strings and the syste i A liberror-perl - Perl modu +le for error/exception handling in an OO-ish way i A libeval-closure-perl - Perl modu +le to safely and cleanly create closures via string eva i A libexception-class-perl - module th +at allows you to declare real exception classes in Perl i libexporter-tiny-perl - tiny expo +rter similar to Sub::Exporter i libextutils-depends-perl - Perl modu +le for building extensions that depend on other extensi i libextutils-pkgconfig-perl - Perl inte +rface to the pkg-config utility i libfcgi-perl - helper mo +dule for FastCGI i libfile-basedir-perl - Perl modu +le to use the freedesktop basedir specification i libfile-desktopentry-perl - Perl modu +le to handle freedesktop .desktop files i libfile-fcntllock-perl - Perl modu +le for file locking with fcntl(2) i libfile-find-rule-perl - module to + search for files based on rules i libfile-listing-perl - module to + parse directory listings i libfile-mimeinfo-perl - Perl modu +le to determine file types i libfont-afm-perl - Perl inte +rface to Adobe Font Metrics files i libfont-ttf-perl - Perl modu +le for TrueType font hacking i libfuture-perl - module fo +r operations awaiting completion i libglib-object-introspection-perl - Perl bind +ings for gobject-introspection libraries i libglib-perl - interface + to the GLib and GObject libraries i libgtk3-perl - Perl bind +ings for the GTK+ graphical user interface library i A libguestfs-perl - guest dis +k image management system - Perl bindings i libhtml-form-perl - module th +at represents an HTML form element i libhtml-format-perl - module fo +r transforming HTML into various formats i A libhtml-html5-entities-perl - module to + encode and decode character entities defined in HTML5 i libhtml-parser-perl - collectio +n of modules that parse HTML text documents i libhtml-tagset-perl - data tabl +es pertaining to HTML i libhtml-tree-perl - Perl modu +le to represent and create HTML syntax trees i libhttp-cookies-perl - HTTP cook +ie jars i libhttp-daemon-perl - simple ht +tp server class i libhttp-date-perl - module of + date conversion routines i libhttp-message-perl - perl inte +rface to HTTP style messages i libhttp-negotiate-perl - implement +ation of content negotiation i libimage-exiftool-perl - library a +nd program to read and write meta information in multim i A libimage-magick-perl - Perl inte +rface to the ImageMagick graphics routines i A libimage-magick-q16-perl - Perl inte +rface to the ImageMagick graphics routines -- Q16 versi i libimport-into-perl - module fo +r importing packages into other packages i A libintl-perl - Uniforum +message translations system compatible i18n library i A libintl-xs-perl - XS Unifor +um message translations system compatible i18n library i libio-async-loop-epoll-perl - Perl exte +nsion for an event loop using epoll i libio-async-perl - modules f +or asynchronous event-driven programming i libio-html-perl - open an H +TML file with automatic charset detection i A libio-interactive-perl - utility m +odule for interactive I/O i A libio-prompt-tiny-perl - module th +at prompts for user input with a default option i libio-pty-perl - Perl modu +le for pseudo tty IO i A libio-socket-inet6-perl - object in +terface for AF_INET6 domain sockets i libio-socket-ssl-perl - Perl modu +le implementing object oriented interface to SSL socket i libio-string-perl - Emulate I +O::File interface for in-core strings i A libio-stringy-perl - modules f +or I/O on in-core objects (strings/arrays) i libipc-run-perl - Perl modu +le for running processes i A libipc-run3-perl - run a sub +process with input/output redirection i libipc-system-simple-perl - Perl modu +le to run commands simply, with detailed diagnostics i A libiterator-perl - Perl impl +ementation of iterators i A libiterator-util-perl - Useful fu +nctions for creating and manipulating iterator objects i libjson-maybexs-perl - interface + to the best available JSON module i A libjson-perl - module fo +r manipulating JSON-formatted data i A libjson-xs-perl - module fo +r manipulating JSON-formatted data (C/XS-accelerated) i liblinux-epoll-perl - perl epol +l module for O(1) multiplexing i liblist-compare-perl - Perl modu +le for comparing elements of two or more lists i liblist-moreutils-perl - Perl modu +le with additional list functions not found in List::Ut i A liblist-moreutils-xs-perl - Perl modu +le providing compiled List::MoreUtils functions i A liblist-someutils-perl - module th +at provides the stuff missing in List::Util i A liblist-someutils-xs-perl - module pr +oviding XS implementation for List::SomeUtils i A liblist-utilsby-perl - higher-or +der list utility functions i liblocale-gettext-perl - module us +ing libc functions for internationalization in Perl i liblwp-mediatypes-perl - module to + guess media type for a file or a URL i liblwp-protocol-https-perl - HTTPS dri +ver for LWP::UserAgent i A libmail-message-perl - generic c +lass representing mail messages (perl library) i A libmail-rfc822-address-perl - Perl exte +nsion for validating email addresses i libmail-sendeasy-perl - Perl modu +le to send plain/html e-mails through SMTP servers i libmail-sender-perl - Perl Modu +le for sending mails with attachments i libmail-sendmail-perl - simple wa +y to send email from a perl script i libmail-transport-perl - perl libr +ary for sending email i libmailtools-perl - modules t +o manipulate email in perl programs i A libmath-base85-perl - Perl exte +nsion for base 85 numbers, as referenced by RFC 1924 i A libmetrics-any-perl - abstract +collection of monitoring metrics i A libmime-charset-perl - module fo +r MIME character set information i libmime-tools-perl - Perl5 mod +ules for MIME-compliant messages i A libmime-types-perl - Perl exte +nsion for determining MIME types and Transfer Encoding i libmodule-implementation-perl - module fo +r loading one of several alternate implementations of a i A libmodule-pluggable-perl - module fo +r giving modules the ability to have plugins i A libmodule-runtime-conflicts-perl - module to + provide information on conflicts for Module::Runtime i libmodule-runtime-perl - Perl modu +le for runtime module handling i libmoo-perl - Minimalis +t Object Orientation library (with Moose compatibility) i A libmoose-perl - modern Pe +rl object system framework i libmoox-aliases-perl - easy alia +sing of methods and attributes in Moo i A libmoox-types-mooselike-perl - module pr +oviding some Moosish types and a type builder i A libmouse-perl - lightweig +ht object framework for Perl i A libmro-compat-perl - mro::* in +terface compatibility for Perls < 5.9.5 i libnamespace-clean-perl - module fo +r keeping imports and functions out of the current name i libnet-dbus-perl - Perl exte +nsion for the DBus bindings i libnet-dns-perl - Perform D +NS queries from a Perl script i libnet-domain-tld-perl - list of c +urrently available Top-level Domains (TLDs) i libnet-http-perl - module pr +oviding low-level HTTP connection client i A libnet-imap-simple-perl - Perl modu +le to manage an IMAP account i libnet-imap-simple-ssl-perl - Subclass +of Net::IMAP::Simple with SSL support i libnet-ip-perl - Perl exte +nsion for manipulating IPv4/IPv6 addresses i A libnet-ipv6addr-perl - module to + validate/manipulate IPv6 addresses i libnet-libidn-perl - Perl bind +ings for GNU Libidn i A libnet-netmask-perl - module to + parse, manipulate and lookup IP network blocks i libnet-smtp-ssl-perl - Perl modu +le providing SSL support to Net::SMTP i libnet-ssleay-perl - Perl modu +le for Secure Sockets Layer (SSL) i A libnetaddr-ip-perl - IP addres +s manipulation module i libnumber-compare-perl - module fo +r performing numeric comparisons in Perl i A libpackage-deprecationmanager-perl - module fo +r managing deprecation warnings for Perl distributions i libpackage-stash-perl - module pr +oviding routines for manipulating stashes i A libpackage-stash-xs-perl - Perl modu +le providing routines for manipulating stashes (XS vers i A libpadwalker-perl - module to + inspect and manipulate lexical variables i libpango-perl - Perl modu +le to layout and render international text i libparams-classify-perl - Perl modu +le for argument type classification i A libparams-util-perl - Perl exte +nsion for simple stand-alone param checking functions i libparse-mime-perl - parse mim +e-types, match against media ranges i A libparse-recdescent-perl - Perl modu +le to create and use recursive-descent parsers i libpath-tiny-perl - file path + utility i A libperl5.34 - shared Pe +rl library i A libperl5.34:i386 - shared Pe +rl library i libperlio-gzip-perl - module pr +oviding a PerlIO layer to gzip/gunzip i A libperlio-utf8-strict-perl - fast and +correct UTF-8 Perl IO module i A libposix-strptime-perl - Perl exte +nsion to the POSIX date parsing strptime(3) function i A libproc-processtable-perl - Perl libr +ary for accessing process table information i librole-tiny-perl - Perl modu +le for minimalist role composition i libscalar-list-utils-perl - modules p +roviding common scalar and list utility subroutines i libsereal-decoder-perl - fast, com +pact, powerful binary deserialization module i libsereal-encoder-perl - fast, com +pact, powerful binary serialization module i A libsocket6-perl - Perl exte +nsions for IPv6 i A libsort-versions-perl - Perl modu +le for sorting of revision (and similar) numbers i libstrictures-perl - Perl modu +le to turn on strict and make all warnings fatal i A libstring-shellquote-perl - module to + quote strings for passing through the shell i libstruct-dumb-perl - module to + create simple lightweight record-like structures i A libsub-exporter-perl - sophistic +ated exporter for custom-built routines i libsub-exporter-progressive-perl - module fo +r using Sub::Exporter only if needed i libsub-identify-perl - module to + retrieve names of code references i A libsub-install-perl - module fo +r installing subroutines into packages easily i libsub-name-perl - module fo +r assigning a new name to referenced sub i libsub-quote-perl - helper mo +dules for subroutines i A libsyntax-keyword-try-perl - try/catch +/finally syntax for perl i A libsys-hostname-long-perl - module tp + determine the long (fully-qualified) hostname i A libsys-virt-perl - Perl modu +le providing an extension for the libvirt library i A libterm-readkey-perl - perl modu +le for simple terminal control i A libtest-metrics-any-perl - module to + assert that code produces metrics via Metrics::Any i libtext-charwidth-perl - get displ +ay widths of characters on the terminal i A libtext-csv-perl - comma-sep +arated values manipulator (using XS or PurePerl) i A libtext-csv-xs-perl - Perl C/XS + module to process Comma-Separated Value files i libtext-glob-perl - Perl modu +le for matching globbing patterns against text i libtext-iconv-perl - module to + convert between character sets in Perl i libtext-levenshtein-perl - implement +ation of the Levenshtein edit distance i A libtext-levenshteinxs-perl - XS implem +entation of the Levenshtein edit distance i A libtext-markdown-discount-perl - Perl inte +rface to Discount, an implementation of Markdown i A libtext-unidecode-perl - US-ASCII +transliterations of Unicode text i libtext-wrapi18n-perl - internati +onalized substitute of Text::Wrap i A libtext-xslate-perl - scalable +template engine for Perl 5 (C/XS accelerated) i A libthrowable-perl - role for +classes that can be thrown i libtie-ixhash-perl - Perl modu +le to order associative arrays i A libtime-duration-perl - module fo +r rounded or exact English expression of durations i A libtime-moment-perl - Perl C/XS + module representing date and time of day with UTC offs i libtimedate-perl - collectio +n of modules to manipulate date/time information i libtry-tiny-perl - module pr +oviding minimalistic try/catch i libtype-tiny-perl - tiny, yet + Moo(se)-compatible type constraint i A libtypes-serialiser-perl - module pr +oviding simple data types for common serialisation form i A libunicode-linebreak-perl - UAX #14 U +nicode Line Breaking Algorithm i libunicode-utf8-perl - encoding +and decoding of UTF-8 encoding form i liburi-perl - module to + manipulate and access URI strings i A libuser-identity-perl - module to + manage a person's identities/roles i libuuid-perl - Perl exte +nsion for using UUID interfaces as defined in e2fsprogs i libvariable-magic-perl - module to + associate user-defined magic to variables from Perl i libwin-hivex-perl - Perl bind +ings to hivex i libwww-perl - simple an +d consistent interface to the world-wide web i libwww-robotrules-perl - database +of robots.txt-derived permissions i libx11-protocol-perl - Perl modu +le for the X Window System Protocol, version 11 i libxml-libxml-perl - Perl inte +rface to the libxml2 library i libxml-namespacesupport-perl - Perl modu +le for supporting simple generic namespaces i libxml-parser-perl - Perl modu +le for parsing XML files i libxml-sax-base-perl - base clas +s for SAX drivers and filters i libxml-sax-expat-perl - Perl modu +le for a SAX2 driver for Expat (XML::Parser) i libxml-sax-perl - Perl modu +le for using and building Perl SAX2 XML processors i libxml-twig-perl - Perl modu +le for processing huge XML documents in tree mode i libxml-writer-perl - Perl modu +le for writing XML documents i libxml-xpath-perl - Perl modu +le for processing XPath i libxml-xpathengine-perl - re-usable + XPath engine for DOM-like trees i A libxs-parse-keyword-perl - XS functi +ons to assist in parsing keyword syntax i libyaml-libyaml-perl - Perl inte +rface to libyaml, a YAML implementation i libyaml-tiny-perl - Perl modu +le for reading and writing YAML files i perl - Larry Wal +l's Practical Extraction and Report Language i perl-base - minimal P +erl system i perl-doc - Perl docu +mentation i A perl-modules-5.34 - Core Perl + modules i perl-openssl-defaults - version c +ompatibility baseline for Perl OpenSSL packages

Replies are listed 'Best First'.
Re: How to fix Perl Installation after system upgrade
by Corion (Patriarch) on Nov 03, 2022 at 08:02 UTC

    This likely stems from having Perl modules with a compiled component ("XS") from the old Perl version, but a new (system) Perl version now.

    The solution is to reinstall all the Perl modules that you installed previously.

    A second solution would be to install a Perl version identical to the old system Perl, but it is relatively hard to replicate the exact compiler settings etc. used for the old system Perl.

    In the long run, there are two approaches:

    • Maintaining a list of prerequisite modules for your programs, and reinstalling that on every upgrade
    • Maintain a separate Perl installation and be independent from system upgrades

    Both have upsides and downsides - with the first option, you get automatic upgrades, with the second, you don't get them.

      @Corion Thanks very much for the reply.

      Now what is the easiest way to fix this?

      Can anyone see a problem with simply taking this list of all the installed perl modules and running apt reinstall list-of-modules

      You mentioned "XS" -- does that have any connection to xs in the module names (in my list)? Would just reinstalling those fix the issue?

      What about perlbrew? I have perlbrew installed.

      Do perlbrew config files contain any important data that needs to be preserved? (Other than a list of installed modules?)

      How can I compile a list of any modules that are installed in perlbrew?

      It seems to me that this should be a mechanical process to recreate a fresh installation, or am I missing something?

      Thanks again for the assist!

        The ďautobundleĒ command for CPAN will help with whatís installed but if you installed with the package manager thatís probably as good a place to start; however itís possible youíve possibly gotten your Perl install into a state it (CPAN) may not run.

        This kind of wonkiness is why if youíre doing anything serious with perl itís going to be much more controlled (by which I mean under your control) to make a separate install from the OSí (using perlbrew or from source) and only install after-market modules into that copy (and/or a local::lib dir) using CPAN (or cpanp or cpanm) rather than being subject to the package managerís whims.

        The cake is a lie.
        The cake is a lie.
        The cake is a lie.

Re: How to fix Perl Installation after system upgrade
by choroba (Cardinal) on Nov 04, 2022 at 09:42 UTC
    If you use perlbrew, you should be safe. But it seems perlbrew itself has problems. List::Util is a core library, maybe you installed a newer version with the old system perl? What's the output of
    perl -v perl -le 'print "@INC"'

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      I found a temporary solution to the problem which was to "deactivate" perlbrew by renaming ~/.perl5 and removing it from the path.

      If I want to put perlbrew back, is there an easy way to find out what packages I had in the old version?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11147928]
Approved by Athanasius
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2023-06-05 06:25 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (22 votes). Check out past polls.