nano error: Error opening terminal: xterm-256color

nano error: Error opening terminal: xterm-256color

Bei der Nutzung von nano bei einer Installation einer VM trat vor kurzem ein Fehler auf:
Error opening terminal: xterm-256color
If I try to switch terminal.app preferences to open terminal windows in "xterm color" instead of xterm-256color everything works fine.

Die Lösung ist einfach, Variable setzen.
export TERM=xterm