Firefox Extensions/Add-ons Won't Install or Stop Working

Symptoms

Occasionally, my Firefox extensions have either stopped working or refuse to install or uninstall. Viewing the Firefox Add-ons Dialog shows the extensions are there but have "This add-on will be installed when Firefox is restarted". Trying to uninstall the add-on shows "This add-on will be uninstalled with Firefox is restarted". Restarting Firefox neither installs nor uninstalls the extensions and instead they remain in the list, doing nothing.

Firefox Extensions Dialog

System

This has worked for me with Firefox 2 on Linux. It might also work with Firefox 3 and/or Windows, I don't know.

Fixing It

Quit all instances of Firefox. Find your Firefox profile directory. This will be in your home directory in ~/.mozilla/firefox/something.default where something is just some random string. Delete the files extensions.cache, extensions.ini and extensions.rdf. These files will be re-created when you restart Firefox. Hopefully then your add-ons will be installed and working.

As I said, this has worked for me, so maybe it will work for you. You might want to do a backup of your Firefox profile before you start deleting files in case you mess it up.

Good luck!