3

I have a Perl script on an old RHEL4 x86_64 Linux computer. This script runs only on this computer, and we'd like to run it on other Linux computers. The issue is there are a ton of Perl .pm and .xs files needed.

I've done the following

  • Created a virtual machine that has the same directory structure as the RHEL4 x86_64 Linux computer. I have run into errors this way, namely the Config.pm file aborting.

  • Used the PAR Packager pp command to package the Perl script. I keep running into errors when packing it.

What other routes can I take in executing the script on other Linux computers?

Borodin
  • 126,100
  • 9
  • 70
  • 144
acerteli
  • 31
  • 2
  • I don't think there's anything specific to x86-64 here. If there are any compiled binaries involved, you have the same architecture on both machines. Without any more details, like *what* errors or which perl packages the script depends on, this is unanswerable. It's not a [mcve] for a debugging question, and the only generic answer is *very* general (what Quentin said). – Peter Cordes Aug 06 '18 at 06:56
  • 1
    Make sure all those modules that the script depends on are installed on the new machine (Easy through your OS's package manager or CPAN. Look into perlbrew or local::lib if you don't have admin rights). Copy the script. Run the script. – Shawn Aug 06 '18 at 07:00
  • 3
    Google for `cpan bundle`. The simplest way would be to use [`autobundle`](https://metacpan.org/pod/release/ANDK/CPAN-1.60/lib/CPAN.pm#autobundle) to create a bundle of all the modules installed on your source computer, started from the command line with `cpan -a`. You may want to edit the result to remove unnecessary modules, but this list can be installed anywhere with a single command. – Borodin Aug 06 '18 at 08:12
  • 1
    watch the perl version, obviously. You could use local::lib / perlbrew to install the correct perl version locally. – bytepusher Aug 06 '18 at 13:21

0 Answers0