nano error: Error opening terminal: xterm-256color

前端 未结 10 562
梦谈多话
梦谈多话 2020-12-22 17:41

After the installation of OSX Lion, I tried to:

nano /etc/apt/sources.list

But I get this error:

Error opening terminal: xt         


        
相关标签:
10条回答
  • 2020-12-22 18:30

    I had this problem connecting to http://sdf.org through Mac OS X Lion. I changed under Terminal Preferences (+,) > Advanced pane, Declare Terminal as to VT-100.

    I also marked Delete Sends Ctrl-H because this Mac connection was confusing zsh.

    It appears to be working for my use case.

    0 讨论(0)
  • 2020-12-22 18:30

    somehow and sometimes "terminfo" folder comes corrupted after a fresh installation. i don't know why, but the problem can be solved in this way:

    1. Download Lion Installer from the App Store
    2. Download unpkg: http://www.macupdate.com/app/mac/16357/unpkg
    3. Open Lion Installer app in Finder (Right click -> Show Package
    Contents)
    4. Open InstallESD.dmg (under SharedSupport)
    5. Unpack BSD.pkg with unpkg (Located under Packages)   Term info
    will be located in the new BSD folder in /usr/share/terminfo
    

    hope it helps.

    0 讨论(0)
  • 2020-12-22 18:37
    1. edit your .bash_profile file

      vim .bash_profile

    2. commnet

      #export TERM=xterm-256color

    3. add this

      export TERMINFO=/usr/share/terminfo

      export TERM=xterm-basic

      to your .bash_profile

    4. finally

      run:

      source .bash_profile

    0 讨论(0)
  • 2020-12-22 18:44

    Mine was quite a unique case but this could help someone. On Android I tried to copy nano from my termux binary folder to /system/xbin. Placed all the library dependencies in /system/lib and got this error. The libncurses.so.6 file I copied from termux had it's TERMINFO file still pointed to /data/data/com.termux/files/usr/share/terminfo

    View pointed path with command

    strings path-to-libncurses.so | grep /terminfo

    To fix either make the termux terminfo dir and subdirs readable and executable by the nano user or copy the terminfo folder somewhere else and use a hexeditor to modify the plain text path in the shared library file.

    Link to zipped terminfo folder https://drive.google.com/file/d/1m1tfHgkGRehBGh1jPMK4EaTgQb9EyCG7/view?usp=drivesdk

    0 讨论(0)
提交回复
热议问题