Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installing Bison on Linux

General procedure

Head to GNU/Bison web page: https://www.gnu.org/software/bison/

Select the download source, let say GNU/FTP: http://ftp.gnu.org/gnu/bison/

Download the newest version (it was 3.8.2 at the time of writing this post):

wget http://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.gz

Unpack sources:

tar -xzf bison-3.8.2.tar.gz
cd bison-3.8.2

Before proceeding check if m4 is already installed, if not:

sudo yum install m4

Configure, build and install Bison from sources:

./configure
make
sudo make install

Check the installed version:

bison -V
bison (GNU Bison) 3.8.2

Installing newest Bison

This note describes how to install the newest version of Bison.

Open the GNU Bison website: https://www.gnu.org/software/bison/ and find the link with mirrors to download the sources.

Open the nearest mirror, e.g. http://ftp.task.gda.pl/pub/gnu/bison/

Search the newest version of Bison, e.g. http://ftp.task.gda.pl/pub/gnu/bison/bison-3.7.6.tar.gz download it, and save in any directory, e.g. ~/Downloads.

Fedora

sudo yum uninstall bison

Unpack the archive:

cd ~/Downloads
tar -xzf bison-3.7.6.tar.gz
cd bison-3.7.6

The installation procedure is described in details in INSTALL file.

Here is the short path:

./configure
make
sudo make install

To uninstall current version of Bison execute command:

sudo make uninstall

Debian

sudo apt-get remove bison

Unpack the archive:

cd ~/Downloads
tar -xzf bison-3.7.6.tar.gz
cd bison-3.7.6

The installation procedure is described in details in INSTALL file.

Here is the short path:

./configure
make
sudo make install

To uninstall current version of Bison execute command:

sudo make uninstall