Skip to content

Instantly share code, notes, and snippets.

@bipinu
Created February 16, 2015 14:49
Show Gist options
  • Save bipinu/520af22ff90994962df7 to your computer and use it in GitHub Desktop.
Save bipinu/520af22ff90994962df7 to your computer and use it in GitHub Desktop.
Install bison 2.7 on Ubuntu 14.04
#!/bin/bash
mkdir /tmp/bison
cd /tmp/bison
apt-get update
apt-get install -y build-essential m4
wget http://ftp.gnu.org/gnu/bison/bison-2.7.tar.gz
tar -xvf bison-2.7.tar.gz
rm bison-2.7.tar.gz
cd bison-2.7
./configure --prefix=/usr/local/bison --with-libiconv-prefix=/usr/local/libiconv/
make
make install
ln -s /usr/local/bison/bin/bison /usr/bin/bison
ln -s /usr/local/bison/bin/yacc /usr/bin/yacc
@dyfluid
Copy link

dyfluid commented Apr 18, 2015

ln -s /usr/local/bison/bin/bison /usr/bin/bison
ln: failed to create symbolic link ‘/usr/bin/bison’: File exists

@dedalqq
Copy link

dedalqq commented Nov 25, 2015

dyfluid.
mv /usr/bin/bison /usr/bin/bisonq
mv /usr/bin/yacc /usr/bin/yaccq
=)

@FouomaOscar
Copy link

Cool, it's work for me.

@arunbm123
Copy link

hi
why are the following lines required ?

ln -s /usr/local/bison/bin/bison /usr/bin/bison
ln -s /usr/local/bison/bin/yacc /usr/bin/yacc

@bipinu
Copy link
Author

bipinu commented Aug 18, 2020

hi
why are the following lines required ?

ln -s /usr/local/bison/bin/bison /usr/bin/bison
ln -s /usr/local/bison/bin/yacc /usr/bin/yacc

Because the binaries were in /usr/local/bison/bin/, which wasn't in system path. This is a really old solution for Ubuntu 14.04 though. It's possible that the binaries are now linked already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment