Ubuntu Tutorial

How To Install tcl-tclex on Ubuntu

Posted on April 1, 2023  (Last modified on May 20, 2023 )
4 minutes  • 690 words

Introduction

In this tutorial we learn how to install tcl-tclex on Ubuntu.

What is tcl-tclex

tcl-tclex is:

tcLex is a lexer (lexical analyzer) generator extension to Tcl. It is inspired by Unix and GNU lex and flex, which are “tools for generating programs that perform pattern-matching on text”. tcLex is very similar to these programs, except it uses Tcl philosophy and syntax, whereas the others use their own syntax and are used in conjunction with the C language. People used to lex or flex should then feel familiar with tcLex. tcLex is a small extension (the Windows compiled version is about 20kb, and the source is about 150kb), because it extensively uses the Tcl library. However, the current doesn’t use Tcl’s regexp code anymore but a patched version is now included in tcLex, which makes it slightly bigger (by a few KB). tcLex should work with Tcl 8.0 and later. tcLex will NEVER work with earlier versions, because it uses Tcl 8.0’s “object” system for performance. The most interesting features are:

There are three methods to install tcl-tclex on Ubuntu. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install tcl-tclex Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install tcl-tclex using apt-get by running the following command:

sudo apt-get -y install tcl-tclex

Install tcl-tclex Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tcl-tclex using apt by running the following command:

sudo apt -y install tcl-tclex

Install tcl-tclex Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install tcl-tclex using aptitude by running the following command:

sudo aptitude -y install tcl-tclex

How To Uninstall tcl-tclex on Ubuntu

To uninstall only the tcl-tclex package we can use the following command:

sudo apt-get remove tcl-tclex

Uninstall tcl-tclex And Its Dependencies

To uninstall tcl-tclex and its dependencies that are no longer needed by Ubuntu, we can use the command below:

sudo apt-get -y autoremove tcl-tclex

Remove tcl-tclex Configurations and Data

To remove tcl-tclex configuration and data from Ubuntu we can use the following command:

sudo apt-get -y purge tcl-tclex

Remove tcl-tclex configuration, data, and all of its dependencies

We can use the following command to remove tcl-tclex configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tcl-tclex

Dependencies

tcl-tclex have the following dependencies:

References

Summary

In this tutorial we learn how to install tcl-tclex package on Ubuntu using different package management tools: apt, apt-get and aptitude.

Follow us

We provides various tutorials about Ubuntu