nano error: Error opening terminal: xterm-256color

Luke picture Luke · Jul 24, 2011 · Viewed 152.8k times · Source

After the installation of OSX Lion, I tried to:

nano /etc/apt/sources.list

But I get this error:

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.

What's happening?

Answer

Meetai.com picture Meetai.com · Jul 10, 2014

On Red Hat this worked for me:

export TERM=xterm

further info here: http://www.cloudfarm.it/fix-error-opening-terminal-xterm-256color-unknown-terminal-type/