Recently, i had to install lex and yacc on quite a few ubuntu/installations because of college practicals exams (15-20 machines approximately) and that really fed me up 🙁 . Installing Lex and Yacc on Ubuntu/LinuxMint isn’t much difficult and is a cake-walk) if you can follow the correct steps as mentioned in this article –
Procedure to install Lex/Yacc on Ubuntu / LinuxMint
sudo apt-get update
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install byacc
sudo apt-get install bison++
sudo apt-get install byacc -j
That’s it it was this much simple 🙂 , Happy Lex and Yacc programming.
If you have any doubts/or want to enquire about any issues/errors feel free to comment, I will be happy to help you 🙂 , also will be adding screenshots to this article once i am done with my practicals.
thank you for helpful information…!!
when i tried sudo apt-get install flex,
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package flex is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
This helped a lot when I had to prepare for my own practical exam!! 😀
sudo apt-get install byacc -j is not working.. it says command j not known from -j
dont give space b\w from and -j
thanks a lot guru
Iam also facing the same problem as Mohith is facing… Plz anyone answer the problem.
Thank you so much …
for kali linux??
I followed the same steps what u told but couldn’t compile the lex program
What might be the error??
thank you so much
thank you so much for the information:)
after installing the lex and yacc tools in ubuntu, is internet required to run the lab programs?
Thanks for this post. It helps me very much.
It is saying index file failed to download.they have been ignored or old ones used …what to do now…
Thanks a lot.