Open Hellfar opened 7 years ago
Unfortunately the Tk system that Trtl relies upon was no longer included with Ruby as of.. Ruby 2.1-ish, so now it's installed as a regular third party gem. The downside is this means on setups without the right system libraries, it can be tricky to install.
Both error messages in your case are complaining that the Tcl libraries required to install Ruby's bindings to Tk are not available, so you'd need to install those at the system level first. What OS are you on? I'm guessing a Linux of some sort based on one of the pathnames.
You'll want to search for "tcl/tk libraries" for your platform, particularly version 8.5, as 8.6 is not supported by Ruby's tk gem. If you're on Ubuntu you might try apt-get install tk8.5-dev tk8.5
but I can't guarantee that.
On the debian-based systems one usually has to uncripple the packages. I always found the biggest hurdle to be to find out the names in use (I use slackware and GoboLinux myself).
By the way, I just compiled both tcl and tk, then installed the tk gem and then the turtle, and it all installed on my system fine. Debian-based systems really get into the way.
URLs I used were:
http://downloads.sourceforge.net/tcl/tcl8.6.7-src.tar.gz http://downloads.sourceforge.net/tcl/tk8.6.7-src.tar.gz https://rubygems.org/gems/tk https://rubygems.org/gems/trtl
The above error is simple to solve - just install the package that includes tcl.h and tk.h.
Or use slackware, it gets less into the way. :D (I track many programs via my cookbooks gem; I simply got tired of distributions forcing their way onto me many years ago.)
These instructions worked well for me on Ubuntu 18.04: https://saveriomiroddi.github.io/Installing-ruby-tk-bindings-gem-on-ubuntu/
In addition to installing the packages Peter mentions above, they suggest symlinking the libraries:
sudo ln -s /usr/lib/x86_64-linux-gnu/tcl8.5/tclConfig.sh /usr/lib/tclConfig.sh
sudo ln -s /usr/lib/x86_64-linux-gnu/tk8.5/tkConfig.sh /usr/lib/tkConfig.sh
sudo ln -s /usr/lib/x86_64-linux-gnu/libtcl8.5.so.0 /usr/lib/libtcl8.5.so.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libtk8.5.so.0 /usr/lib/libtk8.5.so.0
I hope it's not necroposting, but the article has been updated, with a cleaner approach to the issue. Specifically, install the gem via:
$ gem install tk -- \
--with-tcltkversion="$latest_version" \
--with-tcl-lib=/usr/lib/x86_64-linux-gnu \
--with-tk-lib=/usr/lib/x86_64-linux-gnu \
--with-tcl-include=/usr/include/tcl"$latest_version" \
--with-tk-include=/usr/include/tcl"$latest_version" \
--enable-pthread
but the symlinking approach works as well :smile:
I'm not in a position to test all of this yet, but I will add a note to the README pointing here in case anyone is having difficulties. Thanks!
sudo gem install tk -- --with-tcltkversion=8.6 \ --with-tcl-lib=/usr/lib/x86_64-linux-gnu \ --with-tk-lib=/usr/lib/x86_64-linux-gnu \ --with-tcl-include=/usr/include/tcl8.6 \ --with-tk-include=/usr/include/tcl8.6 \ --enable-pthread
I can confirm this is working on Linux kali 6.5.0-kali2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.3-1kali2 (2023-10-03) x86_64 GNU/Linux
┌──(bob㉿kali)-[~] └─$ sudo gem install trtl [sudo] password for bob: Fetching trtl-0.0.2.gem Successfully installed trtl-0.0.2 Parsing documentation for trtl-0.0.2 Installing ri documentation for trtl-0.0.2 Done installing documentation for trtl after 1 seconds 1 gem installed
Hi,
It seems that we can't install the gem using
gem install trtl
.Under
ruby --version
(2.3.0):Under
ruby --version
(2.4.0):Do not hesitate for more informations if I can help :) .