# Help with tkHTML (specifically, require 'tkextlib/tkHTML' fails to find package)

**URL:** <https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100>\
**Category:** ruby-talk\
**Created:** [25 March 2006 21:01 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100 "2006-03-25T21:01:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randy\_Kramer](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Randy\_Kramer](https://rubytalk.org/u/Randy_Kramer)\
**Post date:** [25 March 2006 21:01 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/1 "2006-03-25T21:01:44Z")

</div>

(Ruby 1.8.4 on Mandriva2006)

I need some help with tkHTML. The current problem is that, if I try to follow  
this example (from  
[http://groups.google.com/group/comp.lang.ruby/msg/667a7e153dabd20f](http://groups.google.com/group/comp.lang.ruby/msg/667a7e153dabd20f) ):

require 'tk'  
require 'tkextlib/tkHTML'

.. read a HTML-doc, and set it to the variable 'doc' ...

hv = Tk::HTML\_Widget.new.pack  
hv.parse(doc)

It fails at the step =require 'tkextlib/tkHTML'= with a message:

RuntimeError: TkPackage can't find package Tkhtml  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2

What I've done (generally):

I may have confused the issue, because I've downloaded and installed both  
ActiveTCL and the standalone ktHTML packages. I installed the ktHTML package  
first, and tried the example before installing ActiveTCL, but got the same  
result.

At one point, from somewhere I got the hint that I should run the setup.rb  
files, so I found one in /usr/local/lib/ruby/1.8/tkextlib and another  
in /usr/local/lib/ruby/1.8/tkextlib/tkHTML. They are not executable, so I  
ran them as ruby scripts, i.e. =ruby setup.rb= from the directory containing  
the files. No improvement.

Some observations:

Directory /usr/local/lib/ruby/1.8/tkextlib contains, among other things:

tkHTML/ tkHTML.rb

Directory /usr/local/lib/ruby/1.8/tkextlib/tkHTML contains:

htmlwidget.rb setup.rb

Line 13 in /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb is:

require 'tkextlib/tkHTML/htmlwidget'

Any hints?

Randy Kramer

---

<div class="post-metadata">

**Author:** ![Logan\_Capaldo](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@Logan\_Capaldo](https://rubytalk.org/u/Logan_Capaldo)\
**Post date:** [25 March 2006 21:14 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/2 "2006-03-25T21:14:48Z")

</div>

Did you try:

sudo ruby setup.rb install

?

> **···**
>
> On Mar 25, 2006, at 4:01 PM, Randy Kramer wrote:
> 
> > At one point, from somewhere I got the hint that I should run the setup.rb  
> > files, so I found one in /usr/local/lib/ruby/1.8/tkextlib and another  
> > in /usr/local/lib/ruby/1.8/tkextlib/tkHTML. They are not executable, so I  
> > ran them as ruby scripts, i.e. =ruby setup.rb= from the directory containing  
> > the files. No improvement.

---

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://rubytalk.org/u/Hidetoshi_NAGAI)\
**Post date:** [27 March 2006 02:58 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/3 "2006-03-27T02:58:53Z")

</div>

Message-ID: \<200603251600.10939.rhkramer@gmail.com\>

> It fails at the step =require 'tkextlib/tkHTML'= with a message:
> 
> RuntimeError: TkPackage can't find package Tkhtml  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2
> 
> What I've done (generally):
> 
> I may have confused the issue, because I've downloaded and installed both  
> ActiveTCL and the standalone ktHTML packages. I installed the ktHTML package  
> first, and tried the example before installing ActiveTCL, but got the same  
> result.

I think that your tcltklib.so doesn't load ActiveTcl library.  
Please run "/usr/local/bin/ruby -r tk -e 'p Tk::TCL\_LIBRARY'".  
Probably, it shows the path your original (not ActiveTcl) Tcl/Tk directory.

You may control the path with LD\_LIBRARY\_PATH or TCL\_LIBRARY environment  
variable. For example, "TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.4 /usr/local/bin/ruby -r tk -e 'p Tk::TCL\_LIBRARY'".

You can get the support status of Tk extensions on your environment  
by "/usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb".  
Possibly, you get different result between  
"/usr/local/bin/ruby /usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb"  
and  
"TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.4 /usr/local/bin/ruby /usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb".

> **···**
>
> From: Randy Kramer \<rhkramer@gmail.com\>  
> Subject: Help with tkHTML (specifically, require 'tkextlib/tkHTML' fails to find package)  
> Date: Sun, 26 Mar 2006 06:01:44 +0900  
> --  
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

---

<div class="post-metadata">

**Author:** ![Randy\_Kramer](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Randy\_Kramer](https://rubytalk.org/u/Randy_Kramer)\
**Post date:** [25 March 2006 22:01 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/4 "2006-03-25T22:01:43Z")

</div>

Thanks for the response!

No, at least I hadn't. I've now tried it, didn't solve the problem. (I ran  
the setup in both tkextlib and tkHTML, and it now seems that the require 'tk'  
statement returns true much sooner, but still the same problem with the  
require 'tkextlib/tkHTML':

RuntimeError: TkPackage can't find package Tkhtml  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2

Do you have tkHTML setup? Do you recall how you did it?

Randy Kramer

> **···**
>
> On Saturday 25 March 2006 04:14 pm, Logan Capaldo wrote:
> 
> > Did you try:
> > 
> > sudo ruby setup.rb install

---

<div class="post-metadata">

**Author:** ![Randy\_Kramer](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Randy\_Kramer](https://rubytalk.org/u/Randy_Kramer)\
**Post date:** [27 March 2006 15:38 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/5 "2006-03-27T15:38:39Z")

</div>

Everyone: I'm still not there, any suggestions appreciated.

Hidetoshi NAGAI,

Thanks very much for your help so far! As you can see (from the comments  
interspersed with yours, below) I'm probably out of my depth here, and I  
don't want to waste a lot of your time. Maybe I should delete (uninstall)  
Ruby, ActiveTCL, and the ktHTML packages and reinstall?

If I do that, I'd prefer not to reinstall ActiveTCL (just because of the size  
of it) and install only Ruby and the ktHTML package. I can't immediately  
recall/find from where I downloaded the ktHTML package, there is no version  
number on the package, and the dates on the files are now (of course) the  
dates I downloaded the files, not the original dates.

The size of the tkhtml.tar.gz is 387987 bytes, and the first lines of the  
spec.html file are:

"This is a draft interface specification for the Tk HTML widget currently  
under development. Since it is still a draft, it is subject to change.  
Eventually, the interface will stabilize and this interface specification  
will morph into a manual page."

My question is, is that the latest version, or is the version in ActiveTCL  
more up-to-date?

Below (interspersed with your suggestions) are the things I've tried and the  
results--perhaps you or somebody else can see what I've done wrong. (Or, at  
some time in the fairly near future, I'll uninstall Ruby, etc., and start  
again--it may be a week or two as I have some other things to deal with in  
the next week or so.)

> I think that your tcltklib.so doesn't load ActiveTcl library.  
> Please run "/usr/local/bin/ruby -r tk -e 'p Tk::TCL\_LIBRARY'".  
> Probably, it shows the path your original (not ActiveTcl) Tcl/Tk directory.

Yes, it shows "/usr/lib/tcl8.4"

> You may control the path with LD\_LIBRARY\_PATH or TCL\_LIBRARY environment  
> variable. For example, "TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.4  
> /usr/local/bin/ruby -r tk -e 'p Tk::TCL\_LIBRARY'".

That didn't seem to do anything the first time I tried it, now going back to  
try again and check various things:

&nbsp;&nbsp;&nbsp;\* I now see the following in my environment--is that what I should see?

[rhk@s14 tkHTML]$ set | grep LIBRARY  
\_='p Tk::TCL\_LIBRARY'

&nbsp;&nbsp;&nbsp;\* I installed ActiveTcl 8.5, so I believe the path I should use  
is /usr/local/ActiveTcl/lib/tcl8.5. It exists, and contains some .tcl files  
(e.g., auto.tcl) and subdirectories (e.g., opt0.4).

&nbsp;&nbsp;&nbsp;\* Now I run  
[rhk@s14 tkHTML]$  
TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/ruby -r tk -e 'p  
Tk::TCL\_LIBRARY'

and get: "/usr/lib/tcl8.4" which looks the same as before. Is that what I  
should get?

Earlier (on the first try) I tried running irb and got no better results for  
the require 'tclextlib/tkHTML' statement, but I now realize I should run irb  
something like this:

TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/irb

Let's see how that works--nope, still the same problem:

[rhk@s14 rhk]$ TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/irb  
irb(main):001:0\> require 'tk'  
=\> true  
irb(main):002:0\> require 'tkextlib/tkHTML'  
RuntimeError: TkPackage can't find package Tkhtml  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2

> You can get the support status of Tk extensions on your environment  
> by "/usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb".

That seems useful (now and in the future). Among other things, I see:

\*LACK : tkHTML.rb : require-\>{}  
FAIL-\>[["tkextlib/tkHTML/htmlwidget", :require\_ruby\_lib]]  
\*LACK : tkHTML/htmlwidget.rb : require-\>{} FAIL-\>[["Tkhtml", :package]]  
Ready : tkHTML/setup.rb : require-\>{}

(And maybe half of the packages that scroll by are marked Ready and the other  
half marked LACK (just a guess). I'm guessing that Ready means I'm good to  
go, and LACK means there is a problem.)

> Possibly, you get different result between  
> "/usr/local/bin/ruby /usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb"  
> and  
> "TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.4 /usr/local/bin/ruby  
> /usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb". --

Nope, they seem the same.

\<My "notes", showing more detail--I think you can ignore these\>  
The results for tkHTML seem the same:

[rhk@s14 tkHTML]$  
TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/ruby /usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb

> grep tkHTML

\*LACK : tkHTML.rb : require-\>{}  
FAIL-\>[["tkextlib/tkHTML/htmlwidget", :require\_ruby\_lib]]  
\*LACK : tkHTML/htmlwidget.rb : require-\>{} FAIL-\>[["Tkhtml", :package]]  
Ready : tkHTML/setup.rb : require-\>{}

[rhk@s14 tkHTML]$  
TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/ruby /usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb

> wc

&nbsp;&nbsp;&nbsp;&nbsp;253 1313 12046

[rhk@s14 tkHTML]$ /usr/local/lib/ruby/1.8/tkextlib/pkg\_checker.rb | wc  
&nbsp;&nbsp;&nbsp;&nbsp;253 1313 12046  
\</My "notes", showing more detail--I think you can ignore these\>

Ok, maybe because tkHTML/setup.rb is ready, I should try running that, with  
the TCL\_LIBRARY path prefix:

[rhk@s14 tkHTML]$  
TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/ruby /usr/local/lib/ruby/1.8/tkextlib/tkHTML/setup.rb

And then retry pkg\_checker--no, no change in the output listed previously  
(with or without the TCL\_LIBRARY prefix):

\*LACK : tkHTML.rb : require-\>{}  
FAIL-\>[["tkextlib/tkHTML/htmlwidget", :require\_ruby\_lib]]  
\*LACK : tkHTML/htmlwidget.rb : require-\>{} FAIL-\>[["Tkhtml", :package]]  
Ready : tkHTML/setup.rb : require-\>{}

Randy Kramer

> **···**
>
> On Sunday 26 March 2006 09:58 pm, Hidetoshi NAGAI wrote:

---

<div class="post-metadata">

**Author:** ![Logan\_Capaldo](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@Logan\_Capaldo](https://rubytalk.org/u/Logan_Capaldo)\
**Post date:** [26 March 2006 02:50 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/6 "2006-03-26T02:50:48Z")

</div>

Can't say that I do, I just have slightly more experience with setting things up with setup.rb apparently 😉

It looks like the ruby files are there, but the Tcl/Tk files are missing (or unable to be found).

> **···**
>
> On Mar 25, 2006, at 5:01 PM, Randy Kramer wrote:
> 
> > On Saturday 25 March 2006 04:14 pm, Logan Capaldo wrote:
> > 
> > > Did you try:
> > > 
> > > sudo ruby setup.rb install
> > 
> > Thanks for the response!
> > 
> > No, at least I hadn't. I've now tried it, didn't solve the problem. (I ran  
> > the setup in both tkextlib and tkHTML, and it now seems that the require 'tk'  
> > statement returns true much sooner, but still the same problem with the  
> > require 'tkextlib/tkHTML':
> > 
> > RuntimeError: TkPackage can't find package Tkhtml  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2
> > 
> > Do you have tkHTML setup? Do you recall how you did it?
> > 
> > Randy Kramer

---

<div class="post-metadata">

**Author:** ![Randy\_Kramer](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Randy\_Kramer](https://rubytalk.org/u/Randy_Kramer)\
**Post date:** [27 March 2006 15:48 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/7 "2006-03-27T15:48:26Z")

</div>

Ok, I just found the page where I downloaded the ktHTML packages from:

[http://www.hwaci.com/sw/tkhtml/download.html:](http://www.hwaci.com/sw/tkhtml/download.html:)

"TkHtml Download Page  
Last update: Mon Jul 31 06:34:47 EDT 2000"

"tkhtml.tar.gz  
Description: A tarball containing all the latest source code  
Size: 387987 bytes  
Last modified: Tue Jun 20 20:47:11 EDT 2000"

It looks rather old--I should probably look for something more up-to-date--are  
the only options the ActiveTCL package or CVS?

Randy Kramer

> **···**
>
> On Monday 27 March 2006 10:37 am, Randy Kramer wrote:
> 
> > If I do that, I'd prefer not to reinstall ActiveTCL (just because of the  
> > size of it) and install only Ruby and the ktHTML package. I can't  
> > immediately recall/find from where I downloaded the ktHTML package, there  
> > is no version number on the package, and the dates on the files are now (of  
> > course) the dates I downloaded the files, not the original dates.

---

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://rubytalk.org/u/Hidetoshi_NAGAI)\
**Post date:** [27 March 2006 16:45 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/8 "2006-03-27T16:45:59Z")

</div>

Message-ID: \<200603271037.56960.rhkramer@gmail.com\>

> Thanks very much for your help so far! As you can see (from the comments  
> interspersed with yours, below) I'm probably out of my depth here, and I  
> don't want to waste a lot of your time. Maybe I should delete (uninstall)  
> Ruby, ActiveTCL, and the ktHTML packages and reinstall?

Maybe you need recompile and install tcltklib.so to use ActiveTcl  
libraries by default.  
If you want to recompile it, prease read README.\* files in  
"\<ruby source\>/ext/tk" directory.

Or, compile and install Tkhtml extension for your starndard  
(not ActiveTcl) Tcl/Tk.

> My question is, is that the latest version, or is the version in ActiveTCL  
> more up-to-date?

I think the latest version of Tkhtml is 2.0.

> &nbsp;&nbsp;&nbsp;\* I installed ActiveTcl 8.5, so I believe the path I should use  
> is /usr/local/ActiveTcl/lib/tcl8.5. It exists, and contains some .tcl files  
> (e.g., auto.tcl) and subdirectories (e.g., opt0.4).
> 
> &nbsp;&nbsp;&nbsp;\* Now I run  
> [rhk@s14 tkHTML]$  
> TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/ruby -r tk -e 'p  
> Tk::TCL\_LIBRARY'
> 
> and get: "/usr/lib/tcl8.4" which looks the same as before. Is that what I  
> should get?

You may need to give the library path. For example,  
LD\_LIBRARY\_PATH=/usr/local/ActiveTcl/lib:$LD\_LIBRARY\_PATH TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/ruby -r tk -e 'p Tk::TCL\_LIBRARY'

Or, your tcltklib.so may be disabled stubs and be compiled for Tcl/Tk8.4.  
Then, tcltklib.so cannot link the libraries of Tcl/Tk8.5.

> **···**
>
> From: Randy Kramer \<rhkramer@gmail.com\>  
> Subject: Re: Help with tkHTML (specifically, require 'tkextlib/tkHTML' fails to find package)  
> Date: Tue, 28 Mar 2006 00:38:39 +0900  
> --  
> Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

---

<div class="post-metadata">

**Author:** ![Randy\_Kramer](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Randy\_Kramer](https://rubytalk.org/u/Randy_Kramer)\
**Post date:** [26 March 2006 19:35 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/9 "2006-03-26T19:35:53Z")

</div>

Thanks! I'll have to think about the idea/possibility that the Tcl/Tk files  
are missing--I'm pretty sure tcl is installed:

[root@s14 python]# rpm -q tcl  
tcl-8.4.11-1mdk  
[root@s14 doc]# rpm -V tcl-8.4.11-1mdk  
[root@s14 doc]#

One reason for writing at the moment is that I noticed that a tkhtml.so file  
comes with (or can come with) the tkhtml package(s), and I haven't installed  
that anywhere. Should I? Where? (Maybe those are the Tcl/Tk files that are  
missing??)

Randy Kramer

> **···**
>
> On Saturday 25 March 2006 09:50 pm, Logan Capaldo wrote:
> 
> > On Mar 25, 2006, at 5:01 PM, Randy Kramer wrote:  
> > \> still the same problem with the require 'tkextlib/tkHTML':  
> > \>  
> > \> RuntimeError: TkPackage can't find package Tkhtml  
> > \> from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
> > \> from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
> > \> from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
> > \> from (irb):2  
> > \>  
> > \> Do you have tkHTML setup? Do you recall how you did it?
> 
> > Can't say that I do, I just have slightly more experience with  
> > setting things up with setup.rb apparently 😉
> > 
> > It looks like the ruby files are there, but the Tcl/Tk files are  
> > missing (or unable to be found).

---

<div class="post-metadata">

**Author:** ![Randy\_Kramer](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Randy\_Kramer](https://rubytalk.org/u/Randy_Kramer)\
**Post date:** [27 March 2006 18:21 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/10 "2006-03-27T18:21:50Z")

</div>

---\<good stuff, to look at again later, snipped\>---

> You may need to give the library path. For example,  
> LD\_LIBRARY\_PATH=/usr/local/ActiveTcl/lib:$LD\_LIBRARY\_PATH  
> TCL\_LIBRARY=/usr/local/ActiveTcl/lib/tcl8.5 /usr/local/bin/ruby -r tk -e 'p  
> Tk::TCL\_LIBRARY'
> 
> Or, your tcltklib.so may be disabled stubs and be compiled for Tcl/Tk8.4.  
> Then, tcltklib.so cannot link the libraries of Tcl/Tk8.5.

Ok, thanks! I think I'll download and install ActiveTcl 8.4(.12) and see what  
that does for me.

Randy Kramer

> **···**
>
> On Monday 27 March 2006 11:45 am, Hidetoshi NAGAI wrote:

---

<div class="post-metadata">

**Author:** ![Randy\_Kramer](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Randy\_Kramer](https://rubytalk.org/u/Randy_Kramer)\
**Post date:** [26 March 2006 20:05 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/11 "2006-03-26T20:05:30Z")

</div>

> \> \> still the same problem with the require 'tkextlib/tkHTML':  
> \> \>  
> \> \> RuntimeError: TkPackage can't find package Tkhtml  
> \> \> from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
> \> \> from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
> \> \> from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
> \> \> from (irb):2  
> \> \>  
> \> \> Do you have tkHTML setup? Do you recall how you did it?  
> \>  
> \> Can't say that I do, I just have slightly more experience with  
> \> setting things up with setup.rb apparently 😉  
> \>  
> \> It looks like the ruby files are there, but the Tcl/Tk files are  
> \> missing (or unable to be found).
> 
> Thanks! I'll have to think about the idea/possibility that the Tcl/Tk  
> files are missing--I'm pretty sure tcl is installed:
> 
> [root@s14 python]# rpm -q tcl  
> tcl-8.4.11-1mdk  
> [root@s14 doc]# rpm -V tcl-8.4.11-1mdk  
> [root@s14 doc]#

PS: Another thing reinforcing my belief that the tk files are there is that a  
few days ago I ran a sample program that used tk--the program created a  
stopwatch with a display in a tk "window".

> **···**
>
> On Sunday 26 March 2006 02:35 pm, Randy Kramer wrote:
> 
> > On Saturday 25 March 2006 09:50 pm, Logan Capaldo wrote:  
> > \> On Mar 25, 2006, at 5:01 PM, Randy Kramer wrote:
> 
> > One reason for writing at the moment is that I noticed that a tkhtml.so  
> > file comes with (or can come with) the tkhtml package(s), and I haven't  
> > installed that anywhere. Should I? Where? (Maybe those are the Tcl/Tk  
> > files that are missing??)
> > 
> > Randy Kramer

---

<div class="post-metadata">

**Author:** ![Logan\_Capaldo](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@Logan\_Capaldo](https://rubytalk.org/u/Logan_Capaldo)\
**Post date:** [26 March 2006 20:16 UTC](https://rubytalk.org/t/help-with-tkhtml-specifically-require-tkextlib-tkhtml-fails-to-find-package/26100/12 "2006-03-26T20:16:19Z")

</div>

I was thinking more along the lines of TkHTML specifically, not any and all Tcl/Tk files. I would suggest that installing the tkhtml.so file in its proper place should do the trick. Try and find a README or INSTALL file in the source distribution.

> **···**
>
> On Mar 26, 2006, at 3:05 PM, Randy Kramer wrote:
> 
> > On Sunday 26 March 2006 02:35 pm, Randy Kramer wrote:
> > 
> > > On Saturday 25 March 2006 09:50 pm, Logan Capaldo wrote:
> > > 
> > > > On Mar 25, 2006, at 5:01 PM, Randy Kramer wrote:
> > > > 
> > > > > still the same problem with the require 'tkextlib/tkHTML':
> > > > > 
> > > > > RuntimeError: TkPackage can't find package Tkhtml  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tk/package.rb:86:in `require'  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML/htmlwidget.rb:15  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/local/lib/ruby/1.8/tkextlib/tkHTML.rb:13  
> > > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from (irb):2
> > > > > 
> > > > > Do you have tkHTML setup? Do you recall how you did it?
> > > > 
> > > > Can't say that I do, I just have slightly more experience with  
> > > > setting things up with setup.rb apparently 😉
> > > > 
> > > > It looks like the ruby files are there, but the Tcl/Tk files are  
> > > > missing (or unable to be found).
> > > 
> > > Thanks! I'll have to think about the idea/possibility that the Tcl/Tk  
> > > files are missing--I'm pretty sure tcl is installed:
> > > 
> > > [root@s14 python]# rpm -q tcl  
> > > tcl-8.4.11-1mdk  
> > > [root@s14 doc]# rpm -V tcl-8.4.11-1mdk  
> > > [root@s14 doc]#
> > 
> > PS: Another thing reinforcing my belief that the tk files are there is that a  
> > few days ago I ran a sample program that used tk--the program created a  
> > stopwatch with a display in a tk "window".
> > 
> > > One reason for writing at the moment is that I noticed that a tkhtml.so  
> > > file comes with (or can come with) the tkhtml package(s), and I haven't  
> > > installed that anywhere. Should I? Where? (Maybe those are the Tcl/Tk  
> > > files that are missing??)
> > > 
> > > Randy Kramer
