Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Installing module problem

by WisDomSeeKer34 (Sexton)
on Oct 18, 2016 at 19:29 UTC ( [id://1174237]=perlquestion: print w/replies, xml ) Need Help??

WisDomSeeKer34 has asked for the wisdom of the Perl Monks concerning the following question:

I want to extract url's from an HTML on my harddrive. I want to install the module HTML:TokeParser. I think this is the module that will do the job. But then I get this message:

$ cpan HTML::TokeParser CPAN.pm requires configuration, but most of it can be done automatical +ly. If you answer 'no' below, you will enter an interactive dialog for eac +h configuration option instead. Would you like to configure as much as possible automatically? [yes] y +es Use of uninitialized value $what in concatenation (.) or string at /us +r/share/perl/5.20/App/Cpan.pm line 565, <STDIN> line 1. Warning: You do not have write permission for Perl library directories +. To install modules, you need to configure a local Perl library directo +ry or escalate your privileges. CPAN can help you by bootstrapping the loca +l::lib module or by configuring itself to use 'sudo' (if available). You may + also resolve this problem manually if you need to customize your setup. What approach do you want? (Choose 'local::lib', 'sudo' or 'manual')

First question: will this module do the thing that I want it to do.

Second question: what is the best thing to do? local::lib or sudo.

Replies are listed 'Best First'.
Re: Installing module problem
by 1nickt (Canon) on Oct 18, 2016 at 20:23 UTC

    Generally speaking its better in the long run to create a new Perl installation for your work, including installing libraries, and leave your system Perl alone.

    It's a pain to manage Perl installations and it's a pain to have to become root to work, so many people choose to install Perl without root privileges. Many people use Perlbrew which will install a new Perl version in your home directory and allow you to install libs there with no root access needed.

    The way forward always starts with a minimal test.
Re: Installing module problem
by silent11 (Vicar) on Oct 18, 2016 at 20:41 UTC
Re: Installing module problem
by Punitha Krishna (Initiate) on Oct 19, 2016 at 10:31 UTC

    Try this

     sudo yum --verbose install "perl(HTML::TokeParser)"
      sudo yum --verbose install "perl(HTML::TokeParser)"

      What makes you think that WisDomSeeKer34's operating system uses yum to install packages?

      See also xkcd.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1174237]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-18 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found