Plesk: Nano editor in chroot: Error opening terminal: xterm-256color
I recently came across a strange error, which must have been a combination of my local OS being MacOS and the chroot environment on my server with Plesk.
I logged into a user with chroot'ed shell access using SSH. When trying to start nano editor I got an error:
Error opening terminal: xterm-256color.
I couldn't find out, why nano needs the terminal, but I found out, that the files in `/usr/share/terminfo` were not included in the chroot environment. To add these files I used the recommended `update-chroot.sh` script.
./update-chroot.sh --add /usr/share/terminfo/*/*
./update-chroot.sh --apply all
However, my system did not include the `xterm-256color` file. So I changed the `TERM` environment variable to `xterm-color` using the `.bash_profile` file in my chroot'ed user's home directory.
This website uses Disqus for displaying comments. Due to privacy regulations you need to explicitly consent to loading comments from Disqus.
Show comments