I got a warning after brew install bison
and when trying brew link bison --force
bison is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of bison.
If you need to have bison first in your PATH run:
echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.bash_profile
For compilers to find bison you may need to set:
export LDFLAGS="-L/usr/local/opt/bison/lib"
So I suggest you to add these two above flags, instead of forcing the link of /usr/local
.
So, above all, you will need below three steps:
brew install bison
echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> ~/.bash_profile
export LDFLAGS="-L/usr/local/opt/bison/lib"