The environment is CentOS6. I think it's almost the same for Debian / Ubuntu.
$ pip install readline ---Abbreviation--- /usr/bin/ld: cannot find -lncurses ---Abbreviation---
I was angry
$ locate libncurses /lib64/libncurses.so.5 /lib64/libncurses.so.5.7 /lib64/libncursesw.so.5 /lib64/libncursesw.so.5.7
Without libncurses.so, ld doesn't seem to be able to find the library. libncurses.so.5 is no good. On the other hand, ld-linux.so and libdl dlopen are searched for including the version number, so all you need is libncurses.so.5. Reference
If you have root, it's easy to include the develop package. If not
$ mkdir /tmp/test $ ln -s /lib64/libncurses.so.5 libncurses.so $ LDFLAGS=-L/tmp/test pip install readline
There is no header because there is no devel package, but I can compile it for some reason. Does readline have a header? If you want the header, you can unzip it under your home directory like Previous post. Even if you don't have root, you can usually manage.