dia2code command not found

In this troubleshooting guide we learn how to fix dia2code command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

dia2code: command not found

or when using sudo you get the following error message

sudo: dia2code: command not found

Solutions to dia2code: command not found

How To Fix dia2code: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu dia2code is provided by dia2code package.

dia2code is:

dia2code is a code generator which uses UML diagrams produced by dia, and turns them into C, C++, Java, Ada, PHP, Python, Shapefile, SQL, and C# files.

To fix this problem, we can install more using the command below.

sudo apt-get -y install dia2code

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install dia2code.

sudo apt -y install dia2code

Or if you have aptitude installed you can use the following command.

sudo aptitude install dia2code

Summary

In this tutorial we learn how to fix dia2code command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.