I have an Ubuntu 10.04 LTS server with a minimal install that I want to compile postgres on. With the minimal install the server did not have gcc so I had to do an apt-get install gcc but now I keep getting this error from the postgres ./configure.

configure: error: readline library not found

I can't seem to find the name of the package that contains the readline library. So I have two questions.

  1. What is the name of the package that contains readline?
  2. Is there some way given the error message above for me to find the associated package from its standard name?

1 Answer 1


You probably need to install libreadline-dev.

A quick way to search for packages in cases like this is to use a command like:

apt-cache search libreadline

This command will likely list multiple packages, but if you're interested in compiling things from source then the package ending in -dev probably contains the files the configure script is searching for.

  • Thanks James, I went browsing through the on the web at packages.ubuntu.com/lucid but there were to many libraries that had libreadline-{someversion}. Thanks that fixed it for me.
    – ams
    Dec 21, 2011 at 4:45
  • No problem. In almost all cases the development package will make sure you have the necessary runtime packages installed, so they are a good place to start when you get these sorts of errors when building software from source. Dec 21, 2011 at 10:22

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.