我想在我的一台服务器上运行gnu_parallel
(nproc = 48)。当我尝试运行命令时,
seq 1 5000 | parallel --eta 'echo {} > /dev/null'
我收到了一些错误,
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.
我不想在服务器上重新安装Perl,因为有很多服务器使用它。
我可以做任何不会损害我服务器上运行的当前应用程序的事情。
请告诉我一种并行的方式。
OS: Cent-OS 6.4 64 bit
nproc: 48
RAM: 512 GB
修改
否则我能使用App :: Fatpacker吗?解决问题?
编辑2
我尝试使用Fatpacker失败了。
编辑:3 我尝试安装perlbrew:得到错误的错误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.
答案 0 :(得分:1)
通过以下方式在另一个目录中重新安装perl,
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
来源:Instructions for multiple perl installations
对于makinng并行使用这个新装置,我编辑了从#!/usr/bin/env perl
到#! /usr/local/perl5142/build/perl-5.14.2/perl
的并行线的shebang线。
对任何现有安装都没有造成任何损害,并且Parallel正在按预期工作。
答案 1 :(得分: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.
似乎/usr/local/lib64/perl5/auto/Fcntl/Fcntl.so
是32位。
尝试文件命令:
file /usr/local/lib64/perl5/auto/Fcntl/Fcntl.so