Shell – getting ‘Name collision between …’ errors and how can I fix them

emacsgnu-screenshellvim

Every time I try to launch vim or emacs or even top (I think it's actually any command that uses ncurses) in a unix terminal (on a cluster computer over ssh), I get a a continuous stream of 'Name collision between x x x' errors like this:

Name collision between dumb dumb
Name collision between unknown unknown
Name collision between lpr lpr
Name collision between glasstty glasstty
Name collision between vanilla vanilla
Name collision between ansi+local1 ansi+local1
Name collision between ansi+local ansi+local
......
Name collision between terminet1200 terminet1200 terminet1200 terminet1200 terminet1200 terminet1200 terminet1200 terminet1200 terminet1200 terminet1200 terminet1200 terminet1200
Name collision between h19-a h19-a h19-a h19-a h19-a h19-a h19-a h19-a h19-a h19-a h19-a h19-a
Name collision between h19-bs h19-bs h19-bs h19-bs h19-bs h19-bs h19-bs h19-bs h19-bs h19-bs h19-bs h19-bs
Name collision between h19-us h19-us h19-us h19-us h19-us h19-us h19-us h19-us h19-us h19-us h19-us h19-us
Name collision between h19 h19 h19 h19 h19 h19 h19 h19 h19 h19 h19 h19
......

According to some research I've done on the web this should be related to TERMCAP/TERMINFO, and I think this started happening after I used GNU screen. And in fact, when I am inside a GNU screen session, vim and emacs work fine (except some strange key mappings, for instance arrow keys don't work)

I've tried to set the TERMCAP environment variable to a non-existing file, as I've read somewhere on the internet, and it caused vim to work (with different settings than my usual ones) but not emacs…

Do you know what I can do to solve this problem?

Best Answer

Solved: The problem was I had specified in my ~/.bashrc an LD_LIBRARY_PATH that contained a folder with many shared libraries, some of which were probably duplicates of others. I think in my case it was the ncurses libraries.

Related Question