How To Install tklib on Ubuntu 18.04

In this tutorial we learn how to install tklib on Ubuntu 18.04. tklib is standard Tk Library

Introduction

In this tutorial we learn how to install tklib on Ubuntu 18.04.

What is tklib

tklib is:

Tklib, the standard Tk library, is a collection of common utility functions and widgets all written in pure Tcl/Tk.

Modules included: autoscroll: automatically maps scrollbars when they are needed; canvas: provides a canvas with map background based on square tiles; chatwidget: a composite widget for chat applications; controlwidget: widgets for displaying and controlling numerical values; crosshair: provides commands to (de)activate and track crosshairs; on canvas widgets; ctext: a text widget with syntax highlighting support; cursor: provides a few cursor routines; datefield: an entry widget for the purpose of date entry; Diagrams: helps drawing diagrams, like flowcharts; getstring: a dialog which prompts for a string input; history: provides a history for mechanism for entry widgets; ico: provides functions for reading and writing windows icons; ipentry: a widget for the entering of an IP address; khim: provides key bindings for entering international characters on a keyboard that does not support them; mentry: a multi-entry widget; menubar: creates and manipulates menubars; ntext: provides alternative bindings for the Text widget; Plotchart: provides simple plotting and charting commands; style: provides simple theming using Tk options; swaplist: a dialog which allows one to move options between two lists; tablelist: a multicolumn listbox widget; tkpiechart: 2D or 3D pie chart object in a canvas; tooltip: provides tooltips for Tk widgets; wcb: widget callbacks; widget: a set of megawidgets based on snit system; widgetl: a widget for entry of ordered and unordered lists; widgetv: a widget validator.

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

Install tklib Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install tklib

Install tklib Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tklib using apt by running the following command:

sudo apt -y install tklib

Install tklib 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 tklib using aptitude by running the following command:

sudo aptitude -y install tklib

How To Uninstall tklib on Ubuntu 18.04

To uninstall only the tklib package we can use the following command:

sudo apt-get remove tklib

Uninstall tklib And Its Dependencies

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

sudo apt-get -y autoremove tklib

Remove tklib Configurations and Data

To remove tklib configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge tklib

Remove tklib configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge tklib

References

Summary

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