Command-not-found: "local variable 'cnf' referenced before assignment" shown when entering an unknown command

Is the following affecting everyone?
command-not-found: “local variable ‘cnf’ referenced before assignment” shown when entering an unknown command

this happens almost any time I try to configure anything significant.

Also: I feel like nothing is working all the way.

Perhaps PUREOS needs an announcements page so that we can just be like ahhh okay. Everyone brokedid

1 Like

I have also had that error, when I was trying out PureOS on an old laptop. I think it happens due to a bug that has been reported before, for example here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935556

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932712

Unfortunately there is no fix yet, as far as I know.

The good news is that although this is annoying it’s just a failure of the command-not-found feature which is supposed to give you a message like this:

xyzabc: command not found

or if it’s available in some package that can be installed, it should say this:

Command ‘xyzabc’ not found, but can be installed with:
sudo apt install xyzabc

So you can live without that feature. When you get that strange error message about command-not-found and local variable ‘cnf’ and so on, it just means that the command you tried to use is not available. Try using “apt install” to install the package first.

To get rid of the confusing error message, I think you can safely remove the command-not-found package. Then you will just get the “xyzabc: command not found” message everytime, skipping the fancy feature of checking if there is a package that can be installed to get the command working.

Which command is it that you are trying to use when getting the command-not-found error message?

i had the same error message in the beginning with PureOS, but somehow not anymore:

$ abc

Command 'abc' not found, did you mean:
…

i don’t remember what i did to fix it though :cry:

1 Like

Not true, It does not allow me to configure my VPN, I cant configure it to connect to some servers and/or even change file extensions via command line.

really? what did you do?

I mean, I thought I was good to go, then one day I got the extentions error etc.

I wonder if it means I need to reflash my device again.

I am on the latest OEM from August, using a lIbrem 15v4.

Dang it, just set up more virtual boxes in Gnome.

I went to the wikis and tried all kinds of things. I sort of feel like I need to just reimage again but I should be getting my Librem Key on Monday or Tuesday so it would be a wasted effort if I have to reimage it again to configure the key.

There are so many examples ie
rename -v ‘s/.xxxx/.conf/’ *.xxxx

which is just basic functionality
and yes the files are really there

mainly when I go to configure anything.

If you have a command-not-found problem with the rename command, try this:

sudo apt install rename

1 Like