How to install a Tcl package?

4

1

I am trying to run a Tcl script that has package require cmdline, and it complains:

can't find package cmdline

How do I find and install another Tcl package into an existing Tcl installation?

user322908

Posted 2015-04-21T02:26:58.217

Reputation: 739

Answers

1

Check this page: http://tcl.tk/man/tcl8.5/tutorial/Tcl31.html

Basically, to know where tcl looks, start a tclsh:

% puts $tcl_pkgPath
/usr/lib64 /usr/lib 
% puts $auto_path
/usr/lib64/tcl8.6 /usr/lib64 /usr/lib

but note that you will also need to generate (or install, if you already have it) a pkgIndex.tcl (the same reference above tells you how to make one).

jcoppens

Posted 2015-04-21T02:26:58.217

Reputation: 629

0

In CentOS, I just installed tcllib packages

sudo yum install tcllib

Bluezery

Posted 2015-04-21T02:26:58.217

Reputation: 1