我在使用screen -x
时遇见了这个错误
Must be connected to a terminal.
经过查找资料发现了解决办法https://svennd.be/screen-in-lxc-attach/,在终端输入以下命令后再次运行即可成功:
script /dev/null
后续:
查阅资料的过程中发现使用screen时出现的其他报错问题也可以用script /dev/null
来解决,所以整理了一下:
报错1:
Must be connected to a terminal.
报错2:
Cannot open your terminal '/dev/pts/2'
报错3:
Cannot access '/dev/pts/3': No such file or directory
以上问题均可使用script /dev/null
尝试解决