Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?
share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

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.

share|improve this answer
    
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 '11 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. –  James Henstridge Dec 21 '11 at 10:22
add comment

Your Answer

 
discard

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.