terminalnano

nano error: Error opening terminal: xterm-256color


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?


Solution

  • On Red Hat this worked for me:

    export TERM=xterm
    

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