bison command not found

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

Introduction

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

bison: command not found

or when using sudo you get the following error message

sudo: bison: command not found

Solutions to bison: command not found

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

In Ubuntu bison is provided by bison package.

bison is:

Bison is a general-purpose parser generator that converts a grammar description for an LALR(1) context-free grammar into a C program to parse that grammar. Once you are proficient with Bison, you may use it to develop a wide range of language parsers, from those used in simple desk calculators to complex programming languages.

Bison is upward compatible with Yacc: all properly-written Yacc grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with little trouble. Documentation of the program is in the bison-doc package.

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

sudo apt-get -y install bison

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

You can also use apt command to install bison.

sudo apt -y install bison

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

sudo aptitude install bison

Summary

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