diagram-viewer command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
diagram-viewer: command not found
or when using sudo you get the following error message
sudo: diagram-viewer: command not found
Solutions to diagram-viewer: command not found
How To Fix diagram-viewer: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu diagram-viewer is provided by tklib package.
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; notifywindow: provides unobtrusive window for alerts/notifications; ntext: provides alternative bindings for the Text widget; persistentSelection: makes primary selection persistent; Plotchart: provides simple plotting and charting commands; scrollutil: scrollable widgets and mouse wheel support; 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; widgetPlus: adds features to entry, spinbox and combobox widgets; widgetv: a widget validator.
To fix this problem, we can install more using the command below.
sudo apt-get -y install tklib
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install tklib.
sudo apt -y install tklib
Or if you have aptitude installed you can use the following command.
sudo aptitude install tklib
Summary
In this tutorial we learn how to fix diagram-viewer command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.