thrift command not found

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

Introduction

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

thrift: command not found

or when using sudo you get the following error message

sudo: thrift: command not found

Solutions to thrift: command not found

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

In Ubuntu thrift is provided by thrift-compiler package.

thrift-compiler is:

Thrift is a software framework for the development of reliable and performant communication and data serialization. It combines a software stack with code generation to build services that operate seamlessly across a number of different development languages.

This package contains the compiler used to generate language code from Thrift definition files.

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

sudo apt-get -y install thrift-compiler

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

You can also use apt command to install thrift-compiler.

sudo apt -y install thrift-compiler

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

sudo aptitude install thrift-compiler

Summary

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