Reputation: 115
Someone may notice this is an almost identical question I posted a few days ago regarding tcl / tk. The original recommendation (that worked for this particular error) does not seem to remedy the same error condition that I am currently seeing when attempting to use gtk / gtk2.
I have attempted to switch from tk to gtk because there were subsequent problems with tk that I simply wasn't been able to resolve.
In case it is important, all I am trying to do is Use a GUI from a Perl script.
The remedy for the tk problem was to install tk-devel using yum.
I'm not finding a gtk-devel package, But I did find this on the net, which I did.
sudo yum install gtk* gtk+*
I have also update my perl installation to the current level via yum.
Anyway, when I invoke my test script which has one line in the form of
use Gtk;
or gtk, Gtk2, gtk2 I see the error
Can't locate Gtk.pm in @Inc (file list...)
I am not sure why the original tk issue was fixed by the inclusion of tk-devel and why I have been unable to do the same with the gtk package? Or maybe there is an additional issue involved?
Upvotes: 1
Views: 1311
Reputation: 5899
Right, a lot of the common packages are in the epel.repo : Extra Packages for Enterprise Linux (EPEL) https://fedoraproject.org/wiki/EPEL
Download 'epel-release-7-5.noarch.rpm' https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
And install with # cd Downloads/ && yum install epel-release-7-5.noarch.rpm
Upvotes: 3
Reputation: 5899
»» use Gtk;
«« : Better → use Gtk2;
Gtk.pm is for the ancient gtk+ -1.2.10 : Year 2002? No CentOS 7 packages, perl-Gtk.
Please do : # yum install perl-Gtk2
Provides /usr/lib64/perl5/vendor_perl/Gtk2.pm
Generally : Please use the 'yum provides */[file]' command to decide package names :
Like # yum provides */Gtk2.pm
Upvotes: 3