Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My recently installed Ubuntu system is currently having issues with the command-not-found hook:

josh@sirius:~$ invalid-command
Unable to open binary database /usr/share/command-not-found/programs.d/i386-main.db: File read error
Unable to open binary database /usr/share/command-not-found/programs.d/i386-multiverse.db: File read error
Unable to open binary database /usr/share/command-not-found/programs.d/i386-restricted.db: File read error
Unable to open binary database /usr/share/command-not-found/programs.d/i386-universe.db: File read error
invalid-command: command not found

I have tried reinstalling and dpkg-reconfigureing both command-not-found{,-data} but these don't seem to have fixed it. Is it safe to delete these files, or do I have to run some program to recreate them? I should add that this was originally a 32-bit install that I reinstalled with 64-bit without formatting the disk.

share|improve this question

1 Answer 1

The database files for the 64 bit version are named amd64-*.db, while the 32 bit version ones are named i386-*.db. So apparently you have the 32 bit package installed when you should've had the 64 bit package.

What does this output?

apt-cache policy command-not-found{,-data}
share|improve this answer
    
In here, because apparently I can't format comments nicely: pastebin.com/6fqTMDAn –  dutchie Jul 25 '13 at 14:01
    
@dutchie, hm. Does this list both amd64-*.db and i386-*.db files? ls /usr/share/command-not-found/programs.d/. If so, it might be the old package just failed to remove those for some reason. So just manually removing them should fix your problem. –  geirha Jul 25 '13 at 18:02
    
That did the trick, many thanks! –  dutchie Aug 22 '13 at 12:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.