ipython起動時にReadlineがないと言われたときの対処法

CentOS 5.5にPython 2.6.6をソースから入れたあとにIPython 0.10.1をpipを使ってインストールしたら下記のエラーが出た

WARNING: Readline services not available on this platform.
WARNING: The auto-indent feature requires the readline library

解決法

libreadline.so.4をインストールしてからPythonを再度インストールする

$ yum install libreadline.so.4
$ cd Python-2.6.6
$ ./configure
# ここでconfig.logに
# #define HAVE_LIBREADLINE 1
# と記述されていればおそらくOK
$ make
$ make install