Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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 .

share|improve this answer
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. – Reghu Krishnan G Feb 24 '14 at 10:02
you install flex from source ? – nux Feb 24 '14 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. – Reghu Krishnan G Feb 24 '14 at 10:38
up vote 0 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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