byacc command not found

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

Introduction

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

byacc: command not found

or when using sudo you get the following error message

sudo: byacc: command not found

Solutions to byacc: command not found

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

In Ubuntu byacc is provided by byacc package.

byacc is:

This package provides a parser generator utility that reads a grammar specification from a file and generates an LR(1) parser for it. The parsers consist of a set of LALR(1) parsing tables and a driver routine written in the C programming language. It has a public domain license which includes the generated C.

This package has the backtracking extension, adapted from btyacc.

Related packages: bison, btyacc, antlr

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

sudo apt-get -y install byacc

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

You can also use apt command to install byacc.

sudo apt -y install byacc

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

sudo aptitude install byacc

Summary

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