Installing tk interface to ruby on RH9.0 GNU/LINUX

H

Himanshu Garg

Hello,
I installed ruby 1.8.1 and it works fine. I also installed tk8.4 and
tcl8.4 in /usr/local/ and they work fine too. However when I try to
install the ruby extensions I get errors.

/usr/local/lib/ruby/site_ruby/1.8/i686-linux/tcltklib.so: libtk8.4.so:
cannot open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/tcltklib.so (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/tk.rb:7
from demo/lines1.rb:3:in `require'
from demo/lines1.rb:3

Could you suggest what's wrong. The detailed command sequence for
installation is given in the end of this mail.

Thank You,
Himanshu.

P.S.
I start with extconf.rb as follows:-

[root@Himanshu-tcltklib]#CONFIGURE_ARGS='--with-tcl-include=/usr/local/include/ --with-tk-include=/usr/local/include --with-tcl-lib=/usr/local/lib/ --with-tk-lib=/usr/local/lib/ --enable-tcltk_stubs --with-tcllib=tcl8.4 --with-tklib=tk8.4' ruby extconf.rb
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for dlopen() in -ldl... yes
checking for log() in -lm... yes
checking for tcl.h... yes
checking for tk.h... yes
checking for XOpenDisplay() in -lX11... yes
checking for Tcl_InitStubs() in -ltcl8.4... yes
checking for Tk_InitStubs() in -ltk8.4... yes
creating Makefile


[root@Himanshu tcltklib]# make
make: Nothing to be done for `all'.

[root@Himanshu tcltklib]# make install
install -c -p -m 0755 tcltklib.so
/usr/local/lib/ruby/site_ruby/1.8/i686-linux
install -c -p -m 0644 ./lib/tcltk.rb /usr/local/lib/ruby/site_ruby/1.8

[root@Himanshu tcltklib]# ruby demo/
lines0.tcl lines1.rb lines2.rb safeTk.rb

[root@Himanshu tcltklib]# ruby demo/lines1.rb
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/tcltklib.so: libtk8.4.so:
cannot open shared object file: No such file or directory -
/usr/local/lib/ruby/site_ruby/1.8/i686-linux/tcltklib.so (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/tk.rb:7
from demo/lines1.rb:3:in `require'
from demo/lines1.rb:3

[root@Himanshu tcltklib]#
 
T

ts

H> /usr/local/lib/ruby/site_ruby/1.8/i686-linux/tcltklib.so: libtk8.4.so:
H> cannot open shared object file: No such file or directory -

It's trying to say that at runtime, it can't find libtk8.4.so

This means that the directory where is located libtk8.4.so (probably
/usr/local/lib) is not in /etc/ld.so.conf nor in the environmental
variable LD_LIBRARY_PATH


Guy Decoux
 
H

Himanshu Garg

H> /usr/local/lib/ruby/site_ruby/1.8/i686-linux/tcltklib.so: libtk8.4.so:
H> cannot open shared object file: No such file or directory -

It's trying to say that at runtime, it can't find libtk8.4.so

This means that the directory where is located libtk8.4.so (probably
/usr/local/lib) is not in /etc/ld.so.conf nor in the environmental
variable LD_LIBRARY_PATH


Guy Decoux
Thanks a lot for the surprisingly prompt and absolutely
correct response. I added the entry to /etc/ld.so.conf and ran ldconfig
and everything works fine.

Thank You,
Himanshu.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top