atdgen command not found

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

Introduction

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

atdgen: command not found

or when using sudo you get the following error message

sudo: atdgen: command not found

Solutions to atdgen: command not found

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

In Ubuntu atdgen is provided by libatdgen-ocaml-dev package.

libatdgen-ocaml-dev is:

Atdgen is a command-line program that takes as input type definitions in the ATD syntax and produces OCaml code suitable for data serialization and deserialization. Two data formats are currently supported, these are biniou and JSON.

This package contains the adtgen executable and the files necessary for programming with the library.

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

sudo apt-get -y install libatdgen-ocaml-dev

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

You can also use apt command to install libatdgen-ocaml-dev.

sudo apt -y install libatdgen-ocaml-dev

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

sudo aptitude install libatdgen-ocaml-dev

Summary

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