Forum OpenACS Q&A: Re: Installing Postgresql II
Try libreadline5 or libreadline4 (you might need -dev too).
apt-get install libreadline5 libreadline5-dev
P.S. You might want to try this out:
Much less painful (e.g.
apt-get install postgresql will install the right version of readline for you)