2017-04-20 2 views
0

J'ai des difficultés à faire fonctionner un programme appelé RepeatMasker. Je reçois l'erreur suivante:Module Perl toujours introuvable après l'installation avec cpan

~$ RepeatMasker 
Can't locate Text/Soundex.pm in @INC (you may need to 
install the Text::Soundex module) (@INC contains: /home/florian/Masterarbeit/RepeatMasker 
/etc/perl 
/usr/local/lib/x86_64-linux-gnu/perl/5.22.1 
/usr/local/share/perl/5.22.1 
/usr/lib/x86_64-linux-gnu/perl5/5.22 
/usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 
/usr/share/perl/5.22 /usr/local/lib/site_perl 
/usr/lib/x86_64-linux-gnu/perl-base .) 
at /home/florian/Masterarbeit/RepeatMasker/Taxonomy.pm line 83. 

BEGIN failed--compilation aborted at /home/florian/Masterarbeit/RepeatMasker/Taxonomy.pm line 83. 
Compilation failed in require at /home/florian/Masterarbeit/RepeatMasker/RepeatMasker line 313. 
BEGIN failed--compilation aborted at /home/florian/Masterarbeit/RepeatMasker/RepeatMasker line 313. 

Maintenant, j'ai essayé d'installer le module manquant via CPAN/cpanm:

~$ cpan install Text::Soundex 
Loading internal null logger. Install Log::Log4perl for logging messages 
CPAN: Storable loaded ok (v2.53_01) 
Reading '/home/florian/.cpan/Metadata' 
    Database was generated on Thu, 20 Apr 2017 11:41:02 GMT 
Running install for module 'Text::Soundex' 
CPAN: Digest::SHA loaded ok (v5.95) 
CPAN: Compress::Zlib loaded ok (v2.068) 
Checksum for /home/florian/.cpan/sources/authors/id/R/RJ/RJBS/Text-Soundex-3.05.tar.gz ok 
CPAN: File::Temp loaded ok (v0.2304) 
CPAN: YAML loaded ok (v1.15) 
CPAN: CPAN::Meta::Requirements loaded ok (v2.140) 
CPAN: Parse::CPAN::Meta loaded ok (v1.4414) 
CPAN: CPAN::Meta loaded ok (v2.150005) 
CPAN: Module::CoreList loaded ok (v5.20151213) 
Configuring R/RJ/RJBS/Text-Soundex-3.05.tar.gz with Makefile.PL 
WARNING: Option INSTALLDIRS=site was not recognized. (ignoring) 
The XS code will be compiled. 
Checking if your kit is complete... 
Looks good 
Generating a Unix-style Makefile 
Writing Makefile for Text::Soundex 
Writing MYMETA.yml and MYMETA.json 
    RJBS/Text-Soundex-3.05.tar.gz 
    /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK 
Running make for R/RJ/RJBS/Text-Soundex-3.05.tar.gz 
cp Soundex.pm blib/lib/Text/Soundex.pm 
Running Mkbootstrap for Text::Soundex() 
chmod 644 "Soundex.bs" 
"/usr/bin/perl" "/usr/share/perl/5.22/ExtUtils/xsubpp" -typemap "/usr/share/perl/5.22/ExtUtils/typemap" Soundex.xs > Soundex.xsc && mv Soundex.xsc Soundex.c 
x86_64-linux-gnu-gcc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"3.05\" -DXS_VERSION=\"3.05\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE" Soundex.c 
rm -f blib/arch/auto/Text/Soundex/Soundex.so 
x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong Soundex.o -o blib/arch/auto/Text/Soundex/Soundex.so \ 
     \ 

chmod 755 blib/arch/auto/Text/Soundex/Soundex.so 
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Soundex.bs blib/arch/auto/Text/Soundex/Soundex.bs 644 
Manifying 1 pod document 
    RJBS/Text-Soundex-3.05.tar.gz 
    /usr/bin/make -- OK 
Running make test 
Running Mkbootstrap for Text::Soundex() 
chmod 644 "Soundex.bs" 
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t 
t/basic.t .. ok  
All tests successful. 
Files=1, Tests=18, 0 wallclock secs (0.01 usr + 0.00 sys = 0.01 CPU) 
Result: PASS 
    RJBS/Text-Soundex-3.05.tar.gz 
    /usr/bin/make test -- OK 
Running make install 
Manifying 1 pod document 
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree 
Installing /home/florian/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Text/Soundex/Soundex.so 
Appending installation info to /home/florian/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod 
    RJBS/Text-Soundex-3.05.tar.gz 
    /usr/bin/make install -- OK 

On peut dire qu'elle a travaillé. Mais j'ai toujours la même erreur ci-dessus. Je suis assez perdu, est-ce qu'il s'installe au mauvais endroit? Où?

+2

Assurez-vous que '' cpan' et perl' sont pour la même installation de Perl. Appelez 'which perl' et' which cpan' pour commencer. Regardez aussi '@ INC' avec' perl -E 'disons pour @ INC''. Est-ce que le chemin que 'cpan' a installé votre module là dedans? – simbabque

+0

Comment puis-je voir où cpan a installé le module? cpan/perl pointe sur '/ usr/bin/perl','/usr/bin/cpan' – voiDnyx

Répondre

6

Vous avez configuré le CPAN pour installer le module dans un emplacement non standard (/home/florian/perl5/lib/perl5), mais vous n'avez pas demandé à Perl d'y rechercher des modules.

export PERL5LIB=/home/florian/perl5/lib/perl5 

ou

use lib qw(/home/florian/perl5/lib/perl5); 
+0

J'ai essayé ceci, mais j'ai toujours la même erreur. '~ $ echo $ PERL5LIB /home/florian/perl5/lib' (aussi @INC contient'/home/florian/perl5/lib', donc il aurait dû le trouver là?) – voiDnyx

+2

Inclure le chemin est correct avec un répertoire plus profond: '/ home/florian/perl5/lib/perl5' – daxim

+0

Merci, ceci l'a corrigé :). Sur une note de côté, comment puis-je réinitialiser cpan pour installer à l'emplacement par défaut? – voiDnyx