http://qs1969.pair.com?node_id=11135780


in reply to Alien::Libxml2 - build error on RedHat

G'day iqbal_1956,

Welcome to the Monastery.

"Attempt to reload Scalar/Util.pm aborted."

See "perldiag: Attempt to reload %s aborted." for more details on that.

"Looks like a standard incompatibility between something."

You're using v5.16.3 and the current version is v5.34.0: there's one possible cause.

Scalar::Util is a core module; these are different: "Scalar::Util (for Perl 5.16.3)" and "Scalar::Util (for Perl 5.34.0)". It's also a CPAN module found in the Scalar-List-Utils distribution. Possibly some conflict there.

If I look at the Depenency graph for Alien::Libxml2, it currently defaults to v5.34.0 which shows no dependency on Scalar::Util or Scalar-List-Utils; if I change the version to v5.16.3 it shows additional dependencies, including Scalar-List-Utils.

"All the mentioned modules have been rebuilt with the latest from metacpan ..."

and later:

"Use of all the standard install tools is not under our control so we need to be able to deploy the packages to a non-root owned location which we have control over."

You don't say how you are achieving that, but it seems fraught with potential problems. How are you handling @INC such that the version of Scalar::Util you installed from CPAN is being used in preference to the core version you already have? Did you need to do anything special with $ENV{PATH}? Have you done non-standard things that we should know about to provide you with better help?

It's never a good idea to mess with the system Perl (regardless of the underlying operating system) and your sysadmins may have very good reasons for restricting access.

Take a look at Perlbrew. This will allow you to install CPAN modules without requiring root access. You can also use it to install multiple versions of Perl and easily switch between them (if that's useful for you). I've been using Perlbrew for over a decade, on a variety of OSes, and can highly recommend it. I believe there are similar solutions available; however, I'm not familiar with them — perhaps other monks could suggest alternatives.

— Ken

Replies are listed 'Best First'.
Re^2: Alien::Libxml2 - build error on RedHat
by iqbal_1956 (Initiate) on Aug 12, 2021 at 09:50 UTC

    Thank you for the response which is very helpful and enlightening; I did not know of the existence of perlbrew and will file away the new knowledge for use in future meditations. The tool looks like it would be ideal in this situation for what we would like to achieve. However, our problem is that our host is completely locked down and has no direct internet access. I will try it out on a different host under different circumstances in the future though.