LXC's Nano Corrupt, Can't Edit Config

nano works fine by itself (apt standard install on Ubuntu 20.04)

but when nano is used in something like lxc config edit ct104, it shows [ Mistakes in '/etc/nanorc' ] in the editor window and Error in /etc/nanorc on line 171: Unknown option "stateflags". Error in /etc/nanorc on line 242: Error expanding /usr/share/nano/*.nanorc: No such file or directory after exiting the editor.

i tried reinstalling nano via apt. tried installing via snap (then removed it, cause it didn’t help).

how do i fix the nano instance used by lxc edit?

That’s odd. Do you have any unusual configuration in /etc/nanorc?

Can you try EDITOR=vi lxc config edit ct104 to confirm that vi works properly?

never touched /etc/nanorc. didn’t even know it existed.

vi & vim work fine…

i copied over /etc/nanorc from a healthy system, and the issue persists. the nano it uses is from within one of the snaps, but setting export EDITOR=nano does not help

That’s very odd. I haven’t had much luck in reproducing that here so far.

1 Like