Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

How do I install the Tk module

by zapatafa (Initiate)
on Feb 28, 2016 at 16:51 UTC ( [id://1156384]=perlquestion: print w/replies, xml ) Need Help??

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

I've done a number of google searches on how to install a module (I'm running Mac OS X). Here are some of the places I've gone

Tk module installation by cpan

Cannot install CPAN (or any other modules) as root user!!!

But none of the advice helps. I can't get anything up an running. I just get the message
Warning: Cannot install Bundle::Tk, don't know what it is.
For the second link provided above, I'm not sure at all what the recommendations mean. I don't know how to configure cpan. I don't know whether those are lines to be written into a particular file or run from the command line (I tried running them from the command line and got an error -bash: o: command not found)

Could someone walk me through baby steps please?

Replies are listed 'Best First'.
Re: How do I install the Tk module
by 1nickt (Canon) on Feb 28, 2016 at 20:44 UTC

    Hi, zapatafa

    On OS X it is highly recommended (by Apple as well as by users) to leave the system installation of Perl completely alone (don't even install any modules to it) and use a local installation for your development work.

    The easiest way to do this is to install Perlbrew (and friends) and let it handle managing your perls. Take a couple of minutes to read the instructions there and you'll have it up and running in no time. Once you are using Perlbrew you can install a new version of Perl (or any number of different ones) and perlbrew switch to it; then any modules you install will be in your local home directory and you won't need to become root to install them. This will simplify your life going forward.

    When you do this pay attention to the configuration of App::cpanminus and/or CPAN.pm, as the cause of your original problem is almost certainly, as you suspected, an error therein, particularly in the list of CPAN mirror sites to check for modules.

    You can see what mirrors you currently have configured by looking for urllist in the output of the OS shell command

    $ cpan -J
    or, if you prefer the CPAN shell, with
    cpan[1]> o conf

    Hope this helps!

    edit: show how to examine current CPAN conf.

    The way forward always starts with a minimal test.
Re: How do I install the Tk module
by kcott (Archbishop) on Feb 29, 2016 at 03:50 UTC

    G'day zapatafa,

    I strongly advise that you do not attempt to install Bundle::Tk. Following the Bundle-Tk-1.00 link on that page (to its distribution page), you'll see it's:

    • flagged with ** UNAUTHORIZED RELEASE **
    • dated 01 Feb 1997 (almost two decades old)

    Instead, just install the Tk module, e.g.

    cpan[n]> install Tk

    Assess whether you really need (and don't currently have) any of the other modules listed on the Bundle::Tk page. Install these separately if required.

    I concur with what ++1nickt says regarding not using the System Perl. I've been using Mac OS X for about five years (various versions between 10.6.x and 10.10.3 [current]); I've used perlbrew with all of them; I currently have seven different Perls installed (not including the System Perl).

    — Ken

Re: How do I install the Tk module
by capfan (Sexton) on Mar 01, 2016 at 22:25 UTC

    Hi! This is not baby steps, as I don't have a Mac anymore.

    However, while I was working with Macs, I ended up installing perlbrew. It was easier to get Tk installed using a new Perl release.

    Alternatively, you could use an ActiveState Perl distribution, which comes with pre-compiled Perl/Tk support (recently updated).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2024-04-18 14:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found