# Can't locate Tkx.pm in @INC



## SeaHag (Jul 24, 2010)

I'm trying to run a simple Perl script. The first three lines are:


```
#!\perl\bin



use Tkx;
```




But when I run it I get this error:



```
Can't locate Tkx.pm in @INC (@INC contains: /usr/local/lib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach 
/usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach /usr/local/lib/perl5/5.10.1 .)
```
How can I check if Tkx.pm is installed or how can I install it?


----------



## wblock@ (Jul 25, 2010)

SeaHag said:
			
		

> I'm trying to run a simple Perl script. The first three lines are:
> 
> 
> ```
> ...



Problems start here.  That's a Windows path with backslashes.



> ```
> use Tkx;
> ```



I can't find Tkx in ports.  If there's no port, you can install it from CPAN.  See the man page for cpan(1).  If it requires anything else (Tk in this case), you'll need to install that, too, from ports if available.


----------



## SeaHag (Jul 25, 2010)

I tried;


```
cpan Tkx
```

It failed saying:


```
Checking if your kit is complete...
Looks good
Warning: prerequisite Tcl 0.98 not found.
Writing Makefile for Tkx
---- Unsatisfied dependencies detected during ----
----           GAAS/Tkx-1.08.tar.gz           ----
    Tcl [requires]
Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'Tcl'
Running make for V/VK/VKON/Tcl-0.98.tar.gz
Checksum for /root/.cpan/sources/authors/id/V/VK/VKON/Tcl-0.98.tar.gz ok

  CPAN.pm: Going to build V/VK/VKON/Tcl-0.98.tar.gz

Can't exec "tclsh": No such file or directory at Makefile.PL line 168.
error starting tclsh: No such file or directory
```


Can't find "tclsh" but it's called tclsh8.6. so  I made a softlink;  ln -s tclsh8.6 tclsh then tried again. I don't know if that was the right thing to do but then it failed:


```
CPAN.pm: Going to build V/VK/VKON/Tcl-0.98.tar.gz

tclsh=/usr/local/bin/tclsh
tcl_library=/usr/local/lib/tcl8.6
tcl_version=8.6
LIBS   = -L/usr/local/lib -ltclstub86
INC    = -I/usr/local/include
DEFINE =  -DUSE_TCL_STUBS -DLIB_RUNTIME_DIR=\"/usr/local/lib\" -DTCL_LIB_FILE=\"libtcl86.so\"
Checking if your kit is complete...
Looks good
Writing Makefile for Tcl
cp Tcl.pm blib/lib/Tcl.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.12.1/ExtUtils/xsubpp  -typemap /usr/local/lib/perl5/5.12.1/ExtUtils/typemap -typemap typemap  Tcl.xs > Tcl.xsc && mv Tcl.xsc Tcl.c
Please specify prototyping behavior for Tcl.xs (see perlxs manual)
cc -c  -I/usr/local/include  -DAPPLLIB_EXP="/usr/local/lib/perl5/5.12.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -g    -DVERSION=\"0.98\"  -DXS_VERSION=\"0.98\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.12.1/mach/CORE"  -DUSE_TCL_STUBS -DLIB_RUNTIME_DIR=\"/usr/local/lib\" -DTCL_LIB_FILE=\"libtcl86.so\" Tcl.c
Tcl.xs:32:17: error: tcl.h: No such file or directory
Tcl.xs:117: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
Tcl.xs:118: error: expected ')' before '*' token
Tcl.xs:139: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
Tcl.xs:151: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
Tcl.xs:152: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
.
.
.
```


I don't know what else to do, not having any luck.


----------



## SeaHag (Jul 25, 2010)

I notice there is a lang/p5-Tcl. What is that? I have Tcl 8.6 installed already. Do I need to install p5-Tcl? 

I installed p5-Tcl and now when running cpan Tkx I get this error on every line:


```
attempt to provide package Tk 8.5 failed: package Tk 8.5.8 provided instead at ...
```

Any ideas?


----------



## wblock@ (Jul 25, 2010)

A conflict between where the CPAN modules expect to find other modules and where the port installed it?  Other than that, no idea.  Sorry.


----------

