On Tue, Jul 3, 2012 at 3:16 PM, Antoras <mail@antoras.de> wrote:
Loading package readline-1.0.1.0 ... <command line>: can't load .so/.DLL for: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../lib/libncurses.so (-lncursesw: cannot open shared object file: No such file or directory)

Your Linux distribution pulled a cute stunt that throws the dynamic loader (used for TH and ghci and a few other things) for a loop:  libncurses.so, for backward compatibility purposes, is a GNU ld linker script which references libncursesw.so in a way the dynamic loader doesn't understand.  You can work around this in one of two ways:

1. replace /usr/lib/libncurses.so with a symlink to /usr/lib/libncursesw.so; OR
2. edit /usr/lib/libncurses.so, which is a text file (linker script), to reference "/usr/lib/libncursesw.so" instead of "-lncursesw".

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms