IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Modules Perl Discussion :

DEBIAN, problème installation mechanize


Sujet :

Modules Perl

  1. #1
    Candidat au Club
    Femme Profil pro
    Chargé d'affaire
    Inscrit en
    Février 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Andorre

    Informations professionnelles :
    Activité : Chargé d'affaire

    Informations forums :
    Inscription : Février 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut DEBIAN, problème installation mechanize
    Bonjour,

    Je veux créer un programme perl.
    Tout d'abord j'installe le paquet :


    gueg@debian:~/prg$ sudo apt-get install libwww-mechanize-perl
    Lecture des listes de paquets... Fait
    Construction de l'arbre des dépendances
    Lecture des informations d'état... Fait
    Les NOUVEAUX paquets suivants seront installés :
    libwww-mechanize-perl
    0 mis à jour, 1 nouvellement installés, 0 à enlever et 79 non mis à jour.
    Il est nécessaire de prendre 0 o/111 ko dans les archives.
    Après cette opération, 244 ko d'espace disque supplémentaires seront utilisés.
    Sélection du paquet libwww-mechanize-perl précédemment désélectionné.
    (Lecture de la base de données... 159944 fichiers et répertoires déjà installés.)
    Dépaquetage de libwww-mechanize-perl (à partir de .../libwww-mechanize-perl_1.71-1_all.deb) ...
    Traitement des actions différées (« triggers ») pour « man-db »...
    Paramétrage de libwww-mechanize-perl (1.71-1) ...



    Ensuite lorsque je veux vérifier qu'ils se sont bien installé, j'ai une erreur:


    gueg@debian:~/prg$ perl -e 'use WWW::mechanize'
    Can't locate WWW/mechanize.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at -e line 1.
    BEGIN failed--compilation aborted at -e line 1.



    Je ne vois pas du tout à quoi correspond l'erreur..
    Problème de syntaxe peut-être ?

  2. #2
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 818
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 818
    Points : 499 183
    Points
    499 183
    Par défaut
    Bonjour,

    C'est étrange en effet. Essaye :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    cpan -i WWW::mechanize
    perl -MWWW::mechanize -e ''

  3. #3
    Candidat au Club
    Femme Profil pro
    Chargé d'affaire
    Inscrit en
    Février 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Andorre

    Informations professionnelles :
    Activité : Chargé d'affaire

    Informations forums :
    Inscription : Février 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    Salut,

    Tout d'abord merci pour ta réponse rapide.
    J'ai testé tes commande. Pour le cpan -i le module doit se nommer "WWW::Mechanize" autrement il ne trouve rien.
    Sinon ta deuxième commande me renvoie la même erreur..

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
     
    gueg@debian:~$ sudo cpan -i WWW::mechanize
    [sudo] password for gueg: 
    Going to read '/root/.cpan/Metadata'
      Database was generated on Fri, 27 Feb 2015 05:17:02 GMT
    Warning: Cannot install WWW::mechanize, don't know what it is.
    Try the command
     
        i /WWW::mechanize/
     
    to find objects with matching identifiers.
     
    gueg@debian:~$ sudo cpan -i WWW::Mechanize
    Going to read '/root/.cpan/Metadata'
      Database was generated on Fri, 27 Feb 2015 05:17:02 GMT
    WWW::Mechanize is up to date (1.74).
     
    gueg@debian:~$ perl -MWWW::mechanize -e ''
    Can't locate WWW/mechanize.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .).
    BEGIN failed--compilation aborted.
    Peut-être faut-il que je soit dans le répertoire courant ?

  4. #4
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 818
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 818
    Points : 499 183
    Points
    499 183
    Par défaut
    Je me demande s'il n'y a pas plusieurs versions de Perl sur ton serveur.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    whereis perl
    ls -alh /usr/bin/per*
    ls -alh /usr/local/lib/perl
    ls -alh /usr/share/perl

  5. #5
    Candidat au Club
    Femme Profil pro
    Chargé d'affaire
    Inscrit en
    Février 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Andorre

    Informations professionnelles :
    Activité : Chargé d'affaire

    Informations forums :
    Inscription : Février 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    En faite j'ai voulu installer la librairie via 2 méthodes :

    apt-get install libwww-mechanize-perl
    cpan install WWW::Mechanize

    Peut-être y a-t-il eu une conflit ?
    Sachant que j'ai fait "apt-get install libwww-mechanize-perl" pour la supprimer après.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
     
    gueg@debian:~$ whereis perl
    perl: /usr/bin/perl /etc/perl /usr/lib/perl /usr/bin/X11/perl /usr/local/lib/perl /usr/share/perl /usr/share/man/man1/perl.1.gz
     
    gueg@debian:~$ ls -alh /usr/bin/perl*
    -rwxr-xr-x 2 root root 1,5M sept. 30 12:58 /usr/bin/perl
    -rwxr-xr-x 2 root root 1,5M sept. 30 12:58 /usr/bin/perl5.14.2
    -rwxr-xr-x 2 root root  45K sept. 30 12:58 /usr/bin/perlbug
    -rwxr-xr-x 1 root root  125 sept. 30 12:58 /usr/bin/perldoc
    -rwxr-xr-x 1 root root  13K sept. 30 12:58 /usr/bin/perlivp
    -rwxr-xr-x 2 root root  45K sept. 30 12:58 /usr/bin/perlthanks
     
    gueg@debian:~$ ls -alh /usr/local/lib/perl
    total 12K
    drwxrwsr-x 3 root staff 4,0K févr. 27 08:57 .
    drwxrwsr-x 5 root staff 4,0K févr. 27 08:57 ..
    drwxrwsr-x 3 root staff 4,0K févr. 27 08:57 5.14.2
     
    gueg@debian:~$ ls -alh /usr/share/perl
    total 20K
    drwxr-xr-x   3 root root 4,0K janv. 13 20:33 .
    drwxr-xr-x 334 root root  12K févr. 26 20:33 ..
    lrwxrwxrwx   1 root root    6 janv. 13 20:33 5.14 -> 5.14.2
    drwxr-xr-x  59 root root 4,0K janv. 13 22:03 5.14.2
    Du coup j'aurais deux version de Perl installées, la 5.14 et la 5.14.2 .. ?

  6. #6
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 818
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 818
    Points : 499 183
    Points
    499 183
    Par défaut
    Non, c'est bon.

  7. #7
    Candidat au Club
    Femme Profil pro
    Chargé d'affaire
    Inscrit en
    Février 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Andorre

    Informations professionnelles :
    Activité : Chargé d'affaire

    Informations forums :
    Inscription : Février 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    Connaîtriez-vous une autre méthode d'installation sinon?

  8. #8
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 818
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 818
    Points : 499 183
    Points
    499 183
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    sudo cpan -if WWW::Mechanize

  9. #9
    Candidat au Club
    Femme Profil pro
    Chargé d'affaire
    Inscrit en
    Février 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Andorre

    Informations professionnelles :
    Activité : Chargé d'affaire

    Informations forums :
    Inscription : Février 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    Pas de changement..

    Peut-être que si j'installe l'archive manuellement partir de WWW-Mechanize-1.74.tar.gz ça marchera ?

  10. #10
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 818
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 818
    Points : 499 183
    Points
    499 183
    Par défaut
    J'aimerai bien un retour de ma commande

  11. #11
    Candidat au Club
    Femme Profil pro
    Chargé d'affaire
    Inscrit en
    Février 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Andorre

    Informations professionnelles :
    Activité : Chargé d'affaire

    Informations forums :
    Inscription : Février 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    Je n'ai pas mis le retour car il est assez long mais puisque vous le voulez :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
     
    gueg@debian:~$ sudo cpan -if WWW::Mechanize
    [sudo] password for gueg: 
    Going to read '/root/.cpan/Metadata'
      Database was generated on Fri, 27 Feb 2015 05:17:02 GMT
    Running install for module 'WWW::Mechanize'
    Running make for E/ET/ETHER/WWW-Mechanize-1.74.tar.gz
    Checksum for /root/.cpan/sources/authors/id/E/ET/ETHER/WWW-Mechanize-1.74.tar.gz ok
     
      CPAN.pm: Going to build E/ET/ETHER/WWW-Mechanize-1.74.tar.gz
     
     
    WWW::Mechanize likes to have a lot of test modules for some of its tests.
    The following are modules that would be nice to have, but not required.
     
    	Test::Pod
     	Test::Memory::Cycle
     	Test::Warn
     	Test::Taint
     
     
    Checking if your kit is complete...
    Looks good
    Warning: prerequisite Test::Warn 0.11 not found.
    Writing Makefile for WWW::Mechanize
    Writing MYMETA.yml
    cp lib/WWW/Mechanize/Examples.pod blib/lib/WWW/Mechanize/Examples.pod
    cp lib/WWW/Mechanize/Link.pm blib/lib/WWW/Mechanize/Link.pm
    cp lib/WWW/Mechanize/Image.pm blib/lib/WWW/Mechanize/Image.pm
    cp lib/WWW/Mechanize/Cookbook.pod blib/lib/WWW/Mechanize/Cookbook.pod
    cp lib/WWW/Mechanize/FAQ.pod blib/lib/WWW/Mechanize/FAQ.pod
    cp lib/WWW/Mechanize.pm blib/lib/WWW/Mechanize.pm
    cp bin/mech-dump blib/script/mech-dump
    /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/mech-dump
    Manifying blib/man1/mech-dump.1p
    Manifying blib/man3/WWW::Mechanize::Link.3pm
    Manifying blib/man3/WWW::Mechanize::Examples.3pm
    Manifying blib/man3/WWW::Mechanize::Image.3pm
    Manifying blib/man3/WWW::Mechanize::FAQ.3pm
    Manifying blib/man3/WWW::Mechanize::Cookbook.3pm
    Manifying blib/man3/WWW::Mechanize.3pm
      ETHER/WWW-Mechanize-1.74.tar.gz
      make -- OK
    'YAML' not installed, will not store persistent state
    Running make test
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/00-load.t t/add_header.t t/aliases.t t/area_link.t t/autocheck.t t/clone.t t/content.t t/cookies.t t/credentials-api.t t/credentials.t t/die.t t/dump.t t/field.t t/find_frame.t t/find_image.t t/find_inputs.t t/find_link-warnings.t t/find_link.t t/find_link_id.t t/form-parsing.t t/form_with_fields.t t/frames.t t/image-new.t t/image-parse.t t/link-base.t t/link-relative.t t/link.t t/new.t t/pod-coverage.t t/pod.t t/regex-error.t t/save_content.t t/select.t t/taint.t t/tick.t t/untaint.t t/upload.t t/warn.t t/warnings.t t/local/back.t t/local/click.t t/local/click_button.t t/local/content.t t/local/encoding.t t/local/failure.t t/local/follow.t t/local/form.t t/local/get.t t/local/nonascii.t t/local/overload.t t/local/page_stack.t t/local/referer.t t/local/reload.t t/local/submit.t t/mech-dump/mech-dump.t
    t/00-load.t .............. 1/2 # Testing WWW::Mechanize 1.74, with LWP 6.04, Perl 5.014002, /usr/bin/perl
    # Test::Memory::Cycle is not installed.
    t/00-load.t .............. ok   
    t/add_header.t ........... ok   
    t/aliases.t .............. ok   
    t/area_link.t ............ ok   
    t/autocheck.t ............ skipped: Test::Exception required to test autocheck
    t/clone.t ................ ok   
    t/content.t .............. ok   
    t/cookies.t .............. # Test server http://127.0.0.1:35348 as PID 5564
    t/cookies.t .............. ok     
    t/credentials-api.t ...... Use of uninitialized value in lc at /usr/share/perl5/LWP/UserAgent.pm line 605.
    t/credentials-api.t ...... ok   
    t/credentials.t .......... ok     
    t/die.t .................. skipped: Test::Exception required to test die
    t/dump.t ................. ok   
    t/field.t ................ ok   
    t/find_frame.t ........... ok   
    t/find_image.t ........... ok     
    t/find_inputs.t .......... ok     
    t/find_link-warnings.t ... skipped: Test::Warn required to test t/find_link-warnings.t
    t/find_link.t ............ ok     
    t/find_link_id.t ......... ok    
    t/form-parsing.t ......... ok   
    t/form_with_fields.t ..... 1/? There are 2 forms with the named fields.  The first one was used. at t/form_with_fields.t line 27
    t/form_with_fields.t ..... ok   
    t/frames.t ............... ok   
    t/image-new.t ............ ok     
    t/image-parse.t .......... ok     
    t/link-base.t ............ ok   
    t/link-relative.t ........ ok   
    t/link.t ................. ok     
    t/local/back.t ........... ok     
    t/local/click.t .......... ok   
    t/local/click_button.t ... ok     
    t/local/content.t ........ 1/10 # Running tests against http://localhost:54934/?xml=1
    t/local/content.t ........ ok     
    t/local/encoding.t ....... ok   
    t/local/failure.t ........ ok     
    t/local/follow.t ......... ok     
    t/local/form.t ........... ok     
    t/local/get.t ............ ok     
    t/local/nonascii.t ....... ok   
    t/local/overload.t ....... skipped: Mysteriously stopped passing, and I don't know why.
    t/local/page_stack.t ..... ok     
    t/local/referer.t ........ ok     
    t/local/reload.t ......... ok     
    t/local/submit.t ......... ok     
    t/mech-dump/mech-dump.t .. ok   
    t/new.t .................. ok     
    t/pod-coverage.t ......... skipped: Test::Pod::Coverage 1.04 required for testing POD coverage
    t/pod.t .................. skipped: Test::Pod 1.14 required for testing POD
    t/regex-error.t .......... skipped: Test::Warn required to test t/regex-error.t
    t/save_content.t ......... ok   
    t/select.t ............... ok     
    t/taint.t ................ skipped: Test::Taint required for checking taintedness
    t/tick.t ................. ok   
    t/untaint.t .............. skipped: Test::NoWarnings not installed
    t/upload.t ............... ok   
    t/warn.t ................. skipped: Test::Warn required to test warn
    t/warnings.t ............. skipped: Test::Warn required to test warnings
    All tests successful.
     
    Test Summary Report
    -------------------
    t/local/click_button.t (Wstat: 0 Tests: 19 Failed: 0)
      TODO passed:   15-17, 19
    Files=55, Tests=552, 71 wallclock secs ( 0.29 usr  0.04 sys +  9.21 cusr  0.83 csys = 10.37 CPU)
    Result: PASS
      ETHER/WWW-Mechanize-1.74.tar.gz
      make test -- OK
    Running make install
    Manifying blib/man1/mech-dump.1p
    Manifying blib/man3/WWW::Mechanize::Link.3pm
    Manifying blib/man3/WWW::Mechanize::Examples.3pm
    Manifying blib/man3/WWW::Mechanize::Image.3pm
    Appending installation info to /usr/local/lib/perl/5.14.2/perllocal.pod
      ETHER/WWW-Mechanize-1.74.tar.gz
      make install  -- OK
    À priori pas de problème pour l'installation mais quand je revérifie :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    gueg@debian:~$ perl -MWWW::mechanize -e ''
    Can't locate WWW/mechanize.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .).
    BEGIN failed--compilation aborted.
    Toujours pareil..
    Pourtant j'arrive à faire marcher des script perl de test..

  12. #12
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 818
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 818
    Points : 499 183
    Points
    499 183

  13. #13
    Candidat au Club
    Femme Profil pro
    Chargé d'affaire
    Inscrit en
    Février 2015
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Andorre

    Informations professionnelles :
    Activité : Chargé d'affaire

    Informations forums :
    Inscription : Février 2015
    Messages : 9
    Points : 4
    Points
    4
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    gueg@debian:~$ ls -alh /etc/per*
    total 24K
    drwxr-xr-x   4 root root 4,0K janv. 13 22:03 .
    drwxr-xr-x 141 root root  12K févr. 27 11:55 ..
    drwxr-xr-x   2 root root 4,0K sept. 29 23:54 CPAN
    drwxr-xr-x   2 root root 4,0K janv. 13 22:06 Net

Discussions similaires

  1. Réponses: 4
    Dernier message: 04/08/2010, 18h11
  2. probléme installation opendlap sous debian
    Par titi31fr dans le forum Debian
    Réponses: 5
    Dernier message: 23/09/2009, 18h16
  3. Problème install Postgre 7.4 sur Debian
    Par Rapha222 dans le forum PostgreSQL
    Réponses: 3
    Dernier message: 23/10/2007, 11h35
  4. Problème install Mysql sur Debian
    Par robair dans le forum Débuter
    Réponses: 1
    Dernier message: 24/01/2007, 15h08
  5. problème installation postgresql sous linux debian
    Par pimousse3000 dans le forum PostgreSQL
    Réponses: 1
    Dernier message: 14/12/2006, 14h08

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo