简体   繁体   中英

How to run object TCL in LINUX Environment?

How to run a object TCL script in a LINUX environment? I am working with tcl 8.4. When i am trying to run a below code,

package require Itcl
class Tree {
 variable parent ""
}

I am getting error "package undefined".

Is it possible to run a object TCl with out a package?

How to check whether the package is installed are not?

can any one help me. Any comments are accepted.

You need to install the Itcl package onto your system. As you don't say what variety of linux this is we shall guess that it is debian based. apt-cache search itcl shows itcl3 and itcl3-dev so it is likely that installing these packages will make this available.

On Debian based systems dpkg --list packagename shows if it is installed or not. For instance on my Ubuntu system:

$ dpkg --list tcl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                         Version                      Description
+++-============================-============================-========================================================================
ii  tcl                          8.5.0-2                      The Tool Command Language (default version) - run-time files

If you are using some other Linux variety you may need to find the package management utilities for that system or get the sources for Itcl and build it yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM