Problem:

Commands like vim / vi / crontab -e all throw an error about “terminal compatibility”. This is because your TERM value is set to “screen” as you are no doubt connecting to a box inside a screen session, or are just using screen.

Error:

“E437: terminal capability “cm” required”

Solution:

Quickest fix run: export TERM=xterm Or if for some reason you are not connecting via screen, check your TERM variable by: echo $TERM

If this doesnt work, then you need a terminal that supports ncurses. Easiest way is to just search your package manager for “ncurses”. (I suggest urvxt or gnome-terminal).

If you constantly run into this problem with certain applications, such as screen or tmux, and this keeps happening. A longterm solution would be to edit your .bashrc or .zshrc or (insert terminal configuration file here) with:

TERM=xterm screen
TERM=xterm vim
etc