Thanks for the fast reply! Alas, same result
Since you are an expert, I will show the whole set of errors as it may make sense to you.
2019-05-28 07:18:15 +0200
[sudo] password for jorgen:
Installing TK GEM with TCL8.6-dev
ERROR: Error installing tk:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/tk-0.2.0/ext/tk
/usr/bin/ruby2.5 -I /usr/local/lib/site_ruby/2.5.0 -r ./siteconf20190528-2317-4d8buh.rb extconf.rb --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
Configure options for Ruby/Tk may be updated.
So, delete files which depend on old configs.
check functions.checking for ruby_native_thread_p() in ruby.h… yes
checking for rb_errinfo() in ruby.h… yes
checking for rb_safe_level() in ruby.h… yes
checking for rb_hash_lookup() in ruby.h… yes
checking for rb_proc_new() in ruby.h… yes
checking for rb_obj_untrust() in ruby.h… yes
checking for rb_obj_taint() in ruby.h… yes
checking for rb_set_safe_level_force() in ruby.h… yes
checking for rb_sourcefile() in ruby.h… yes
checking for rb_thread_alive_p() in ruby.h… no
checking for rb_thread_check_trap_pending() in ruby.h… yes
checking for ruby_enc_find_basename() in ruby.h… yes
check libraries.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
Specified Tcl/Tk version is [“8.6”, “8.6”]
Use ActiveTcl libraries (if available).
Search tclConfig.sh (in /usr/lib/x86_64-linux-gnu) and tkConfig.sh (in /usr/lib/x86_64-linux-gnu).
Fail to find [tclConfig.sh, tkConfig.sh]
Use X11 libraries (or use TK_XINCLUDES/TK_XLIBSW information on tkConfig.sh).
checking for XOpenDisplay() in -lX11… yes
checking for tcl.h… no
checking for tk.h… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
Can’t find “tcl.h”.
Can’t find “tk.h”.
Can’t find proper Tcl/Tk libraries. So, can’t make tcltklib.so which is required by Ruby/Tk.
If you have Tcl/Tk libraries on your environment, you may be able to use them with configure options (see ext/tk/README.tcltklib).
At present, Tcl/Tk8.6 is not supported. Although you can try to use Tcl/Tk8.6 with configure options, it will not work correctly. I recommend you to use Tcl/Tk8.5 or 8.4.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.5.0/gems/tk-0.2.0 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/tk-0.2.0/gem_make.out
testing TK GEM
2019-05-28 07:18:31 +0200
Traceback (most recent call last):
3: from Rubytk_patch.rb:17:in
<main>' 2: from Rubytk_patch.rb:42:inclass:TK_Patch’
1: from /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in
require' /usr/local/lib/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:inrequire’: cannot load such file – tk (LoadError)