Como posso instalar módulos CPAN localmente sem acesso root (erro DynaLoader.pm linha 229)?

Não funciona com outros módulos, mas para dar um exemplo. Eu instalei Text :: CSV_XS com uma configuração de CPAN:

<code>'makepl_arg' => q[PREFIX=~/lib],
</code>

Quando tento executar um script test.pl:

$ perl test.pl

<code>#!/usr/bin/perl

use lib "/homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi";

use Text::CSV_XS;

print "test";
</code>

eu recebo

Can't load '/homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so' for module Text::CSV_XS: /homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so: cannot open shared object file: No such file or directory at /www/common/perl/lib/5.8.2/i686-linux/DynaLoader.pm line 229.
at test.pl line 6
Compilation failed in require at test.pl line 6.
BEGIN failed--compilation aborted at test.pl line 6.

Eu rastreei o erro de volta ao DynaLoader.pm acontece nesta linha:

<code># Many dynamic extension loading problems will appear to come from
# this section of code: XYZ failed at line 123 of DynaLoader.pm.
# Often these errors are actually occurring in the initialisation
# C code of the extension XS file. Perl reports the error as being
# in this perl code simply because this was the last perl code
# it executed.

my $libref = dl_load_file($file, $module->dl_load_flags) or
    croak("Can't load '$file' for module $module: ".dl_error());
</code>

CSV_XS.so existe no diretório acima

questionAnswers(6)

yourAnswerToTheQuestion