Reputation: 115
Running Perl 5 on Centos 7 and trying to install tcl/tk.
I've installed tk, tk-devel, tcl and tcl-devel using yum. The yum install appears to work fine. In fact, I re-ran the yum commands and saw a "nothing to be done" type of message.
In my perl file, the only code (after a declaration) is either
use tk;
Or
use Tk;
I'm not sure which is correct. However, either one produces an error when I run the file -
Can't locate tk.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./test.pl line 4.
BEGIN failed--compilation aborted at ./test.pl line 4.
If I do a "find" from / searching for tk.pm the file is not found.
After the initial failure I found this on a site, which appears to be an additional step?
to install
tcl-8.5.13-4.el7.x86_64
tcl-devel-8.5.13-4.el7.x86_64
Invoking either one from the Linux command line generates a file not found error.
If I do a "find" from / searching for either file nothing is found.
It seems obvious I am missing something, but have no idea what it night be.
Upvotes: 1
Views: 3081
Reputation: 24063
The Perl module is Tk.pm. RPMs for Perl modules generally follow the pattern:
Module RPM
------ ---
Foo::Bar perl-Foo-Bar
So run:
yum install perl-Tk
and in your script, do:
use Tk;
Upvotes: 4