PDA

View Full Version : Perl/Tk installation fails due to missing X include files



InDenial
30th November 2005, 04:03 AM
Hi everyone.. I'm new here and wished I ended here up sooner but I got things working sofar without this forum. Took a little longer maybe but oh well..

First... I am running Fedora Core 4 in Vmware 5.5.0 and I am trying to install a perl module Tk using CPAN. The problem is however that the install fails.

I get the following message.



Using -L/usr/X11R6/lib to find /usr/X11R6/lib/libX11.so.6.2
Cannot find X include files via /usr/X11R6/include
Cannot find X include files anywhere at ./myConfig line 332.


ofcourse it can not find the X include files cause they really are not there. I found info online somewhere (concerning Debian) that you should install xlibs-devel but since I can not find those using Yum I suspect that in this situation I need to install something else.

Does someone know what I should install to get those files I need?

Thanks in advance

gavinw6662
30th November 2005, 08:11 AM
can't tk be found via yum??

Spoon!
30th November 2005, 09:38 AM
can't tk be found via yum??
I agree with gavinw6662, you should just install it with:

yum install perl-Tk

InDenial
30th November 2005, 12:42 PM
Hmmm.... Interesting.. it worked. :-) thanks...!!

Does this mean that all Perl Modules should be installed through Yum? If not.. how do I know when to install trough Yum or to install in the "normal" way: CPAN ?

ZiaTioN
30th November 2005, 04:59 PM
Does this mean that all Perl Modules should be installed through Yum?


Not neccessarily.



If not.. how do I know when to install trough Yum or to install in the "normal" way: CPAN ?


When using CPAN does not work try Yum. :-)

CPAN compiles their modules to be used on native Linux platforms. You will generally run into issues when using an emulator like vmware and will always run into issues on Windows. For Windows you can use an application that comes with activestate's package called "ppm" (perl package manager). For emulators you can try Yum, or apt-get, which is what I like to use.

The thing is that CPAN is ALWAYS going to have the largest library of perl modules. So you may have issue finding certain ones in the yum or apt repositories. You should always try CPAN first and then something else if that fails.

when you say you are "using CPAN" do you mean you are doing

perl -MCPAN -e "install Module::Name"

or are you just downloading the module and building from source?

InDenial
30th November 2005, 05:21 PM
Thanks for the reply...

So in short... first cpan and if that does not work right, check to see if there is something using yum...:-)

I am using Vmware to get aquainted wit Linux and for some developping and wanting to see if it worked for me. The reason for installing Tk was writing Perl scripts wich I then could run from my Windows workstation using Xmanager or Exceed. (we do not have direct access to the networks we manage from our workstation)

I used to work on Windows and installing modules using ppm worked fine, but this is Linux and cpan came with it so..

Well the way I do it is just run cpan

and then do a install Module::Name

so

[root@Vigor10 ~]$cpan

cpan>install Tk

ZiaTioN
30th November 2005, 06:28 PM
I am using Vmware to get aquainted wit Linux and for some developping and wanting to see if it worked for me.


Not that I don't like vmware, but why not just dual boot?

Using the cpan shell and then installing is the same as the way I suggested. I just do it all in a single command.

I use Tk regularly (or have in the past) and it is a very robust gui environemnt for perl. The great thing about Tk is that it is platform independant. There are others you can use; however, like wxPerl (http://wxperl.sourceforge.net/) which is far less mature and has less documentation to support but this graphical environemnt will take on more of the default look of the OS it runs on. wxPerl is also suppose to be platform independant. perl/GTk (http://gtk2-perl.sourceforge.net/) is another for Linux platforms. It uses gnome libraries to generate a set of perl bindings.

InDenial
30th November 2005, 07:02 PM
Not that I don't like vmware, but why not just dual boot?

Well a couple of reasons why not to do a dual boot.:



First of all to run perl scripts with Tk through an xterm session I need both of the operating systems to be running
second, I am not comfortable enough yet with Linux
Another Option would be to install Fedora on another Machine, but this means extra noise, more powerusage, more hardware while I want to get rid of the pile of computer parts lying around here... ;)



I use Tk regularly (or have in the past) and it is a very robust gui environemnt for perl. The great thing about Tk is that it is platform independant. There are others you can use; however, like wxPerl (http://wxperl.sourceforge.net/) which is far less mature and has less documentation to support but this graphical environemnt will take on more of the default look of the OS it runs on. wxPerl is also suppose to be platform independant. perl/GTk (http://gtk2-perl.sourceforge.net/) is another for Linux platforms. It uses gnome libraries to generate a set of perl bindings.

It is really great indeed. We run network Management tools (Like HPOV, OSM and simple Perl scripts on our WIndows XP workstations from a Sun Server. using Exceed. I was not really aware that there were others I could use, but since we have production sun servers at work I suspect that they do not use opensource software. I am gonna check it tomorrow. Want to know if the scripts I write work at all at work... :confused:

Spoon!
30th November 2005, 10:28 PM
Does this mean that all Perl Modules should be installed through Yum? If not.. how do I know when to install trough Yum or to install in the "normal" way: CPAN ?
The ones that you can install through Yum are listed in "yum list perl-*"; you should install those through Yum. Other ones you can use CPAN.