rebar command not found

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

Introduction

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

rebar: command not found

or when using sudo you get the following error message

sudo: rebar: command not found

Solutions to rebar: command not found

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

In Ubuntu rebar is provided by rebar package.

rebar is:

rebar is an Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.

rebar is a self-contained Erlang script, so it’s easy to distribute or even embed directly in a project. Where possible, rebar uses standard Erlang/OTP conventions for project structures, thus minimizing the amount of build configuration work. rebar also provides dependency management, enabling application writers to easily re-use common libraries from a variety of locations (git, hg, etc).

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

sudo apt-get -y install rebar

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

You can also use apt command to install rebar.

sudo apt -y install rebar

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

sudo aptitude install rebar

Summary

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