flatc command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
flatc: command not found
or when using sudo you get the following error message
sudo: flatc: command not found
Solutions to flatc: command not found
How To Fix flatc: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu flatc is provided by flatbuffers-compiler package.
flatbuffers-compiler is:
FlatBuffers is an efficient cross platform serialization library for C++, C#, C, Go, Java, JavaScript, TypeScript, PHP, and Python. It was originally created at Google for game development and other performance-critical applications.
This package contains the flat buffer compiler that is used for translating from .proto files (containing the definitions) to the language binding for the supported languages.
To fix this problem, we can install more using the command below.
sudo apt-get -y install flatbuffers-compiler
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install flatbuffers-compiler.
sudo apt -y install flatbuffers-compiler
Or if you have aptitude installed you can use the following command.
sudo aptitude install flatbuffers-compiler
Summary
In this tutorial we learn how to fix flatc command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.