f



Why can't perl program see Tk module?

I'm not an expert in Perl, as will probably become clear.

I'm trying to run a program which requires PerlTk under Linux,
so I installed the perltk RPM which I found through http:/rpmfind.net .
(There was only one such RPM.)

Now when I run the perl program it fails at the line
perl -e 'use Tk;'

If I run this line by itself I get:
[tim@william PerlTk-8.11]$ perl -e 'use Tk;'
Can't locate loadable object for module Tk in @INC 
(@INC contains: ... /usr/lib/perl5/site_perl ...)

In fact there is a directory /usr/lib/perl5/site_perl/Tk
as well as a file /usr/lib/perl5/site_perl/Tk.pm

Is there something I need to do to make the desired "loadable object"?

Any advice or suggestions gratefully received.

-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
0
tim
8/8/2003 2:42:40 PM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

1 Replies
594 Views

Similar Articles

[PageSpeed] 5

"Timothy Murphy" <tim@maths.tcd.ie> wrote in message
news:bh0ct0$30rc$1@boole.maths.tcd.ie...
> I'm not an expert in Perl, as will probably become clear.
>
> I'm trying to run a program which requires PerlTk under Linux,
> so I installed the perltk RPM which I found through http:/rpmfind.net .
> (There was only one such RPM.)
>
> Now when I run the perl program it fails at the line
> perl -e 'use Tk;'
>
> If I run this line by itself I get:
> [tim@william PerlTk-8.11]$ perl -e 'use Tk;'
> Can't locate loadable object for module Tk in @INC
> (@INC contains: ... /usr/lib/perl5/site_perl ...)
>

I would guess that the Tk version you found wasn't compiled against the perl you
are using. I would *not* use an rpm for this.

> In fact there is a directory /usr/lib/perl5/site_perl/Tk
> as well as a file /usr/lib/perl5/site_perl/Tk.pm
>
> Is there something I need to do to make the desired "loadable object"?
>
> Any advice or suggestions gratefully received.

Same advice I gave a couple days ago to "tbd"

Download Tk800.024 from CPAN.

Unzip, untar and patch that Tk using Patch-SREZIC-Tk-800_025.012 at:

http://www.cpan.org/modules/by-authors/id/SREZIC/

Once it is patched then build and install your Tk by these four simple steps:

perl Makefile.PL
make
make test
make install

Jack
PS..You never mentioned your platform or your perl version?


0
Jack
8/10/2003 2:53:42 AM
Reply:

Similar Artilces:

Can't get passed 'use tk;' in my 1st perl/tk program.
I'm trying to run my 1st perl/tk program and can't get passed the "use Tk;" command. I get error, "Can't locate Tk.pm" and if I add a "use lib" pointer to directory containing Tk.pm, I get error message "Can't locate loadable object for module Tk::Event". SEE BELOW for actual scripts and error messages. Environment: Mac OS x 10.3.8; perl version 5.8.1; Tk directory Tk-804.027. Experince level: Used to write lots of perl code, 15 years ago on Sun/unix. Just wrote my 1st perl code on MAC. This is my first try at pe...

Perl/Tk: can't get -command=> \&function to work 'on-the-fly'!!
Please Help! I am trying to define buttons 'on-the-fly' mostly because their number is determined in a config file - I don't know how many I will need. It's ROYALLY NOT WORKING. I think Tk.pm is having issues. And it's all driving me very... verrrryyy... batty. *** I WANT THIS TO WORK *** (pseudo-code) for i=1;i<100,i++ { $handle[i] = menubar->command(-label => "test_i", %somecolors, -command => Move2Folder(i)); *** IS THIS TOO MUCH TO ASK??? *** 1) If I 'unroll it' (see end of this message) AND wrap the Move2Folder function...

install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 2
hello i have a strange problem with DBI module. has anyone any clue about what is wrong here? my connection string: --------------------- use DBI; use DBD::ODBC; use DBI qw(:sql_types); use strict; use warnings; my $db = "something"; my $user = 'XXX'; my $passwd = 'XXX'; my $dbh = DBI->connect('dbi:Oracle:XXX', $user,$passwd, {RaiseError => 1, AutoCommit => 0}) or die $DBI::errstr; ################# This gives the foll...

Can't build Tk with threaded Perl on Win32
I don't know if this is a know issue or not: If I try to build Tk800.024 or Tk800.025 with a threaded Perl (Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS, either 5.8.0 or 5.8.1-RC5) on Win32 I get this:- ===== cl -c -I.. -I../pTk/mTk/xlib -nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT _SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -DNDEBUG -O1 -DVERSION=\"800.025\ " -DXS_VERSION=\"800.025\" "-IC:\perl...

w2ksp4 cygwin Perl/Tk 'cpan -i Tk' fails
Hello, world! I have a W2K SP4 box with a fresh install of Cygwin, and would like to use Perl/Tk. When I attempt to install the Tk module using cpan: dpchrist@w2k30g:~$ cpan -i Tk CPAN: Storable loaded ok Going to read /home/dpchrist/.cpan/Metadata Database was generated on Sat, 13 Sep 2003 12:45:46 GMT Running install for module Tk ... Failed Test Stat Wstat Total Fail Failed List of Failed -------------------------------------------------------------------- ----------- t/cursor.t 255 65280 1 1 100.00% 1 t/entry.t ...

Linux Perl-TK -> Win32 Perl-Tk
I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would like to run on my Win32 laptop. I am not interested in dual-booting this laptop but would like to get the app up an running. I'm a perl-Tk hack at best. What is the best/easiest way to port the application? thanks, Mike On Tue, 21 Dec 2004 03:01:21 +0000, Michael Seningen wrote: > I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would > like to run on my Win32 laptop. > > I am not interested in dual-booting this laptop but would like to get > the ap...

"can't find " perl/tk error when running in debugger
application run fine from command line. When trying to debug the application, the debugger complain that it can't find Tk in the INC path. Tk is installed in a non-standard directory. It is true Tk is not in the the INC paths, but the application runs fine? Even a BEGIN { @INC = ( @INC, "<directory>" ) } at the beginning of the script fails locate Tk. I Check @INC paths to make sure there isn't any other TK's installed. Running IRIX and perl 5.8. any help? ...

[tk] Equivalent to Perl's Tk::Tiler?
Hi All: I making arbitrarily large forms and in doing similar in Perl, I've used Tk::Tiler, a scrollable frame. I'd just pack my various entries into the form, and set a max size, from which the form would automatically scroll if the contents were larger than the form size. I've found a scrollable canvas sample I could use, but worry about the of resources it might take up. Any pointers? Thanks. Forrest From: Forrest Chang <fkc_email-news@yahoo.com> Subject: [tk] Equivalent to Perl's Tk::Tiler? Date: Tue, 6 Dec 2005 02:17:33 +0900 Message-ID: <81lkyz79...

perl -e "use Tk" failed after installing perl tk
Now I want to debug perl script through ptkdb under Windows XP. I installed perl tk 804.028 using the below command first because ptkdb depends on perl tk. ppm install Tk But some errors pop out when the command(perl -e "use Tk") exec after installing perl tk, " Can't locate Tk.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/ lib .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. " ActivePerl: Build 1004 Perl: 5.10.0 On 19 mai, 15:30, Erik <zhengfen...@gmail.com> wrote: > Now I want to debug perl script thro...

Can't See dot.tk
When I try to view my dot.tk doamin it won't show up, In fact I can't view any dot.tk domains except for the actual www.dot.tk doamin. Please help! ...

Perl can't locate modules, but they are there!
I know I've done this before. I downloaded and created a bunch of modules DBI, DBD::Informix, WML::Twig, etc and built them on an AIX 5.3 machine. I then cpio'ed up the files that were added to /usr/opt/perl and dropped them down on another 5.3 machine (that machine didn't have cc_r). Now even though the files are there I keep getting... Can't locate DBI.pm in @INC (@INC contains: /usr/opt/perl5/lib/5.8.2/aix-thread- multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-mul ti /usr/opt/perl5/lib/site_perl/5.8.2 /usr/opt/perl5/lib/site_perl .....

Re: What's new in Tk 8.4 for Perl/Tk
Revised: http://www.lehigh.edu/~sol0/ptk/whats-new.html -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to majordomo@lists.stanford.edu ...

FAQ 3.30 I've read perlembed, perlguts, etc., but I can't embed perl in my C program; what am I doing wrong?
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 3.30: I've read perlembed, perlguts, etc., but I can't embed perl in my C program; what am I doing wrong? Download the ExtUtils::Embed kit from CPAN and run `make test'. If the tests pass, read the pods again and again and again. If they fail, see perlbug a...

FAQ 3.28 I've read perlembed, perlguts, etc., but I can't embed perl in my C program; what am I doing wrong?
This is an excerpt from the latest version perlfaq3.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 3.28: I've read perlembed, perlguts, etc., but I can't embed perl in my C program; what am I doing wrong? Download the ExtUtils::Embed kit from CPAN and run `make test'. If the tests pass, rea...

Web resources about - Why can't perl program see Tk module? - comp.lang.perl.tk

Resources last updated: 2/8/2016 10:51:38 PM