[Ubuntu / PERL ]Problem installing WWW::Mechanize mod


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [Ubuntu / PERL ]Problem installing WWW::Mechanize mod
# 1  
Old 03-07-2015
Hammer & Screwdriver [Ubuntu / PERL ]Problem installing WWW::Mechanize mod

Hello everyone,

I've got some problem intalling a perl module.
The installation is well done as you can see below.

Code:
gueg@ux31:~$ 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 paquets suivants ont été installés automatiquement et ne sont plus nécessaires :
[...]
Les NOUVEAUX paquets suivants seront installés :
  libwww-mechanize-perl
0 mis à jour, 1 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de prendre 0 o/91,8 ko dans les archives.
Après cette opération, 231 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... 201284 fichiers et répertoires déjà installés.)
Préparation du décompactage de .../libwww-mechanize-perl_1.73-1_all.deb ...
Décompactage de libwww-mechanize-perl (1.73-1) ...
Traitement déclenché pour  man-db (2.6.7.1-1ubuntu1) ...
Paramétrage de libwww-mechanize-perl (1.73-1) ...

But when I try the module, I've got an error message on the screen.. Previous module have been test well..

Code:
gueg@ux31:~$ perl -e 'use WWW::mechanize'
Can't locate WWW/mechanize.pm in @INC (you may need to install the WWW::mechanize module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

If you have any idea where this error come from, I'll be gratefull !!

Thanks
# 2  
Old 03-07-2015
Perl looks for installed modules in the paths defined in @INC. So you need to figure out if apt-get install installed WWW:Mechanize in one of these paths. You may also try installing using CPAN.
# 3  
Old 03-07-2015
Hello, I've found the module here :

Code:
gueg@ux31:~$ ls /usr/share/perl5
Archive     Date          Digest    File  Lintian      Mail    Text
Authen      Debconf       Dpkg      Font  Log          Module  Time
autodie     Debian        Dpkg.pm   HTML  LWP          Net     URI
autodie.pm  DebianNet.pm  Email     HTTP  lwpcook.pod  Parse   URI.pm
Class       Devel         Encode    IO    LWP.pm       Pod     WWW
Crypt       dialog.pl     Fatal.pm  IPC   lwptut.pod   Term    YAML

gueg@ux31:~$ ls /usr/share/perl5/WWW/
Mechanize  Mechanize.pm  RobotRules  RobotRules.pm

Where do I move it ?
# 4  
Old 03-07-2015
Quote:
Originally Posted by tot94
Code:
gueg@ux31:~$ perl -e 'use WWW::mechanize'
Can't locate WWW/mechanize.pm in @INC

Actually @INC has one of the path as /usr/share/perl5

Just observed that it's WWW::Mechanize with an upper-case 'M' and you're calling it as WWW:mechanize with a lower-case 'm'.
# 5  
Old 03-07-2015
Effectively, I don't encounter errors with this orthography.
Code:
gueg@ux31:~/prg$ perl -e 'use WWW::Mechanize'

But now I realize I have coding errors haha
Thanks !

Last edited by tot94; 03-07-2015 at 03:15 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Shmem problem installing Oracle 12 C on Ubuntu 18.04

Hi, I'm a junior programmer. This is my first post here, please excuse me if that's not the correct place :) For days now I've been trying to install Oracle DB 12c R2 on Ubuntu 18.04. I'm at my wits' end. The software itself installs fine and a Listener can be started but I can't start... (15 Replies)
Discussion started by: Marika
15 Replies

2. Proxy Server

Problem with Installing Perl Module in Fedora 20

Hi, I have downloaded Audio::Beep. I tried to install it through CPAN but i got YAML error. Then I have tried to install it manually. I tried all the instructions provided in README file. It worked but when i am compiling , it still gives me error: # ls acct21.pl~ imap(2).pl ... (15 Replies)
Discussion started by: zak100
15 Replies

3. Shell Programming and Scripting

WWW:::Mechanize - Anyone have sample scripts?

Hello, I am trying to get to learn WWW::Mechanize & have found alot of sample scripts (that dont work) so am wondering if anyone has any that do, I basically just learn from stripping current bits out seeing how they work etc.. etc.. - if anyone can point me to somewhere that has a few good... (0 Replies)
Discussion started by: t0mb
0 Replies

4. Programming

WWW::Mechanize Question

We've been running perl scripts using the www::mechanize module on a linux box with no issues, however we just implemented the same scripts on an aix machine, aix 6.1, perl 5.8.8, and I am running into the issue with Content_Encoding: gzip in the returned html. I can't read it in that it is coming... (0 Replies)
Discussion started by: islanderman
0 Replies

5. Solaris

Perl problem while installing Veritas Storage Foundation

Hi Guys, I am getting some Perl problems during my Veritas Storage Foundation installation on Solaris 10, 64 Bit. The Solaris is running in a Virtual Machine on a MAC: bash-3.00# ./installer Can't load 'perl/lib/5.10.0/i86pc-solaris-thread-multi-64int/auto/threads/threads.so' for module... (0 Replies)
Discussion started by: Korko
0 Replies

6. Ubuntu

Grub rescue problem after installing ubuntu 10.04 amd64 after i386

Hi all, I have Windows XP dual boot with Ubuntu 8.10 on my system. I brought in a portable HDD on which I installed Ubuntu 10.04 32-bit. The grub boot loader was installed along with this and to boot windows, I've had to plug in the HDD (with lucid install) everytime. It had been working fine.... (0 Replies)
Discussion started by: morningSunshine
0 Replies

7. Programming

Mod Perl 2 with byte range help

I am writing a mod perl 2 download module and I am facing the same issue as this guy. mp2 / Apache byterange filter | ModPerl | ModPerl If I remove the check for EOS in byterange_filter.c and recompile Apache2, the byte range filter is executed and the result is correct but I am not sure that... (0 Replies)
Discussion started by: metalbone
0 Replies

8. Shell Programming and Scripting

Perl WWW:Mechanize failing

So, I've just started learning Perl, and I've decided to read up on some modules. I encountered WWW::Mechanize, which interests me, so I decided to try out a couple of basic tutorials. One of them is found here. I tried what seems a very basic case: #!/usr/bin/perl use WWW::Mechanize; $url... (1 Reply)
Discussion started by: treesloth
1 Replies
Login or Register to Ask a Question