I wanted to install wine as a non root user into my home folder. but when i used ./configure it gave the output

configure: error: no suitable flex found. Please install the 'flex' package.

So I installed flex as non-root in one of my directories but still the above error message persists.

How do I make configure detect the flex I have installed?

3 Answers 3


If you want to try to install wine from a repository not from source this could help you :

Install Wine

It should solve your problem .

  • I do not have root access so cannot use apt get. I have to install it locally in my workstation. I am almost there but not having flex is the only hurdle I have. Feb 24, 2014 at 10:02
  • you install flex from source ?
    – nux
    Feb 24, 2014 at 10:19
  • yes, in a separate directory. ./configure cannot find it as I don't know how to add this directory to ./configure's search list. Feb 24, 2014 at 10:38

I think I found the answer. ./configure's Default search directories are the ones listed in PATH.

If one types echo $PATH a list of paths separated by colons will be printed. All that we need to do is add the new directory paths to 'PATH' so that ./configure will check in these directories also.

For example in my case I made a directory 'Install' with sub-directories 'bin','lib','include' and 'share'.

Now I use the following commands to add these directories to 'PATH'


then I run ./configure

and all is well


I had similar issues, in fact at terminal it asked me to install using below command and the OS automatically installed by downloading from the internet.

sudo apt install flex

And also it complained about missing bison, so below command installed bison too.

sudo apt install bison

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.