I've noticed that this bug only occurs when LC_ALL is either unset or set to C.
Set LC_ALL to your prefered language, for example LC_ALL="en_US.UTF-8" in /etc/environment. Log out and log back in and try typing some random unkown command and command-not-found won't crash anymore.
I've noticed that this bug only occurs when LC_ALL is either unset or set to C. "en_US. UTF-8" in /etc/environment. Log out and log back in and try typing some random unkown command and command-not-found won't crash anymore.
Set LC_ALL to your prefered language, for example LC_ALL=