0

I'm attempting to run a Tcl program, Sguil server, on Ubuntu 18.04.4 LTS.

After modifying the configuration files as per the instructions I ran the program:

sudo ./sguild

I received the following error:

2020-05-10 15:13:29 Error: Failed to load package fileutil::magic::mimetype. fileutil::magic::mimetype is required for HTTPS/WSS.

I confirmed that fileutil is available:

echo "puts [package req fileutil]" | tclsh
1.16

And that fileutil::magic::mimetype is not available:

echo "puts [package req fileutil::magic::mimetype]" | tclsh
can't find package fileutil::magic::mimetype

I ran the following, which suggests that fileutil is included in tcllib:

dpkg -S tcl | grep fileutil
tcllib: /usr/share/doc/tcllib/html/fileutil.html
tcllib: /usr/share/tcltk/tcllib1.19/fileutil/pkgIndex.tcl
tcllib: /usr/share/tcltk/tcllib1.19/fileutil
tcllib: /usr/share/tcltk/tcllib1.19/fileutil/multi.tcl
tcllib: /usr/share/tcltk/tcllib1.19/fileutil/traverse.tcl
tcllib: /usr/share/tcltk/tcllib1.19/fileutil/fileutil.tcl
tcllib: /usr/share/tcltk/tcllib1.19/fileutil/multiop.tcl
tcllib: /usr/share/tcltk/tcllib1.19/fileutil/decode.tcl
tcllib: /usr/share/man/man3/fileutil.3tcl.gz

The tcllib package is already installed:

apt list tcllib
Listing... Done
tcllib/bionic,bionic,now 1.19-dfsg-2 all [installed]

Any ideas why fileutil::magic::mimetype fails to load, or what package provides it?

cherdt
  • 167
  • 10

1 Answers1

0

As @steeldriver pointed out, the fileutil::magic::mimetype library is no longer a part of the Tcl libraries, but its features are now available in fileutil::magic::filetype. This library available in the tcllib package.

(This appears to be a change in Tcl 8.6, the version available in the bionic repos for Ubuntu 18.04.4 LTS. I checked a CentOS 7 machine with Tcl 8.5 and the fileutil::magic::mimetype library was present.)

In my case I was able to resolve the errors by updating references in the code for the Sguil application from fileutil::magic::mimetype to fileutil::magic::filetype.

cherdt
  • 167
  • 10