0

I wanted to run gnu_parallel on one of my servers(nproc=48). When I try to run the command,

seq 1 5000 | parallel --eta 'echo {} > /dev/null'

I was getting some errors,

Can't load '/usr/local/lib64/perl5/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/local/lib64/perl5/auto/Fcntl/Fcntl.so: wrong ELF class: ELFCLASS32 at /usr/lib64/perl5/XSLoader.pm line 70.
 at /usr/local/lib64/perl5/Fcntl.pm line 215
BEGIN failed--compilation aborted at /usr/local/lib64/perl5/Fcntl.pm line 216.
Compilation failed in require at /usr/local/lib64/perl5/POSIX.pm line 19.
BEGIN failed--compilation aborted at /usr/local/lib64/perl5/POSIX.pm line 19.
Compilation failed in require at /usr/bin/parallel line 24.
BEGIN failed--compilation aborted at /usr/bin/parallel line 24.

I don’t want to re-install Perl on the server as there are many servers using it.

I can do anything which will not harm current applications running on my servers.

Please tell me a way to run parallel.

OS: Cent-OS 6.4  64 bit
nproc: 48
RAM: 512 GB

EDIT:

Else Will I be able to use App::Fatpacker ? for solving the issue ?

EDIT 2

I tried and failed using Fatpacker.

EDIT: 3 I tried Installing perlbrew: got following errors of wrong ELFClASS

    Can't load '/usr/local/lib64/perl5/auto/PerlIO/scalar/scalar.so' for module PerlIO::scalar: /usr/local/lib64/perl5/auto/PerlIO/scalar/scalar.so: wrong ELF class: ELFCLASS32 at /usr/lib64/perl5/XSLoader.pm line 70.
 at /usr/local/lib64/perl5/PerlIO/scalar.pm line 4
Compilation failed in require at (eval 1) line 3.
FatPacker error loading App/perlbrew.pm (could be a perl installation issue?) at perlbrew-23345 line 551.
BEGIN failed--compilation aborted at perlbrew-23345 line 562.
aravind ramesh
  • 307
  • 2
  • 15

2 Answers2

1

Make a new installation of perl in a different directory by following,

sudo mkdir /usr/local/perl5142
sudo chown $USER:$USER /usr/local/perl5142
cd /usr/local/perl5142/
mkdir build cpan
cd build/
wget http://www.cpan.org/src/perl-5.14.2.tar.gz
tar xzvf perl-5.14.2.tar.gz
cd perl-5.14.2
rm -f config.sh Policy.sh ; sh Configure -de -Dprefix=/usr/local/perl5142
make && make test && make install

Source: Instructions for multiple perl installations

For makinng the parallel to use this new installation I've edited the shebang line of the parallel from #!/usr/bin/env perl to #! /usr/local/perl5142/build/perl-5.14.2/perl.

No harm done to any of the existing installations and Parallel is working as expected.

aravind ramesh
  • 307
  • 2
  • 15
0

Can't load '/usr/local/lib64/perl5/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/local/lib64/perl5/auto/Fcntl/Fcntl.so: wrong ELF class: ELFCLASS32 at /usr/lib64/perl5/XSLoader.pm line 70.

It seems that /usr/local/lib64/perl5/auto/Fcntl/Fcntl.so is 32-bit.

try file command : file /usr/local/lib64/perl5/auto/Fcntl/Fcntl.so

zzn
  • 2,376
  • 16
  • 30
  • /usr/local/lib64/perl5/auto/Fcntl/Fcntl.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped – aravind ramesh Mar 19 '14 at 09:04
  • As file shows: `/usr/local/lib64/perl5/auto/Fcntl/Fcntl.so` is 32-bit. Strangely, why 32-bit library located in lib64/? – zzn Mar 19 '14 at 09:05
  • What should I do know ? Fixable problem ? – aravind ramesh Mar 19 '14 at 09:06
  • @aravindramesh You may install some 32-bit modules in your server, but perl is 64-bit. So check the installation of perl modules, and install the 64-bit one! The problem will be fixed! – zzn Mar 19 '14 at 09:17
  • Please elaborate. What should I install. – aravind ramesh Mar 19 '14 at 09:18
  • @aravindramesh You can also reinstall perl to a **different path**, and let parallel use it! This will not harm any current applications! – zzn Mar 19 '14 at 09:23
  • @aravindramesh Sorry, I know little about perl, may be you can try **reinstall perl** – zzn Mar 19 '14 at 09:26
  • I do not want do that. It might cause problems with existing applications. – aravind ramesh Mar 19 '14 at 09:32
  • @aravindramesh **reinstall perl to a different path** it have nothing to do with existing applications, just let parallel use the new perl. – zzn Mar 19 '14 at 09:35
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/50031/discussion-between-aravind-ramesh-and-fhvrrt) – aravind ramesh Mar 19 '14 at 12:49
  • Re "It might cause problems with existing applications.", It's true that it might cause problems. On the other hand, your broken Perl installation is currently definitely causing real problems. – ikegami Mar 19 '14 at 14:05
  • @ikegami I dont know how but they are running smoothly. I need a altenative to this problem. – aravind ramesh Mar 19 '14 at 16:21
  • Running smoothly? That's great! How did you solve your problem? You should post it as an answer so that 1) it can help the next person with the same problem, and 2) so the question can be marked as solved. – ikegami Mar 19 '14 at 16:42
  • @ikegami All the servers(servers in server) which were already there, are running properly. I am not able to do anything new. The problem persists as stated above in my question. – aravind ramesh Mar 19 '14 at 17:06
  • 1
    So your Perl installation is broken, but you want to fix it without changing it? – ikegami Mar 19 '14 at 17:09
  • @ikegami I can do anything which will not harm existing servers. – aravind ramesh Mar 20 '14 at 02:20
  • You'll have to decide what has a smaller risk of causing harm: Doing nothing and continuing to operate with a corrupted installation of Perl and pray the resulting problems are caught before they cause harm, or fix the corrupted installation of Perl. – ikegami Mar 20 '14 at 02:38
  • Please tell me how to fix this. – aravind ramesh Mar 20 '14 at 03:38