This is a quick fix for a problem I had when upgrading to Ubuntu 10.04, after having used the Mozilla PPA.
The Firefox upgrade failed during the distribution upgrade process (from 9.10 to 10.04). I was told to run `dpkg -a –configure`, and the same error occurred again (it’s in bold).
$ sudo dpkg -a --configure
Setting up firefox (3.6.3+nobinonly-0ubuntu4) ...
update-alternatives: error: alternative path /usr/bin/firefox doesn't exist.
dpkg: error processing firefox (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of firefox-3.5:
firefox-3.5 depends on firefox; however:
Package firefox is not configured yet.
dpkg: error processing firefox-3.5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-3.0:
firefox-3.0 depends on firefox; however:
Package firefox is not configured yet.
dpkg: error processing firefox-3.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-gnome-support:
firefox-gnome-support depends on firefox (= 3.6.3+nobinonly-0ubuntu4); however:
Package firefox is not configured yet.
dpkg: error processing firefox-gnome-support (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox-3.5-gnome-support:
firefox-3.5-gnome-support depends on firefox-gnome-support; however:
Package firefox-gnome-support is not configured yet.
dpkg: error processing firefox-3.5-gnome-support (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
firefox
firefox-3.5
firefox-3.0
firefox-gnome-support
firefox-3.5-gnome-support
A quick web search brought up a bug report, and I was able to figure out this fix with the help of one of the comments:
Update: Fixed.My original solution was only temporary, and had to be repeated for each Firefox update (all the way through every update with 10.04, 10.10, now 11.04…). I’ve found the root of the problem now, by comparing local dpkg diversions for Firefox on my affected machines against an unaffected clean Ubuntu install.
On my laptop:
$ sudo dpkg-divert --list | grep firefox
local diversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu
local diversion of /usr/bin/mozilla-firefox to /usr/bin/mozilla-firefox.ubuntu
The clean Ubuntu install returned no results for the above command. (Also, note that in the full output for dpkg-divert –list, those were the only local diversion — another hint that they were from the PPA upgrade rather than Ubuntu itself.)
So, I ran the following commands to remove the diversions:
$ sudo dpkg-divert --remove /usr/bin/mozilla-firefox
$ sudo dpkg-divert --remove /usr/bin/firefox
Then, the most recent Firefox upgrades worked without a hitch on both of my affected machines. Finally fixed… *fingers crossed*
Updated: This isn’t a complete fix, as the problem reoccurs every time Firefox is updated. If someone knows how to fix this for good, let me know…
$ sudo rm /usr/bin/firefox
$ cd /usr/bin
$ sudo ln -s ../lib/firefox-<your-current-version>/firefox.sh firefox
$ sudo chmod 0777 firefox
$ sudo apt-get -f install
The symlink for /usr/bin/firefox had been pointing to /usr/bin/firefox-3.5, which no longer existed, so the commands above (1) remove the dead-end link; (2) add the proper link (YMMV depending on which version of Firefox you are upgrading to); (3) resume the upgrade process.
Hope that helps!
2 thoughts on “SOLUTION: Firefox Fails When Upgrading After Using Mozilla PPA”
Had the same problem, I simply install
firefox-gnome-support-dbg
from Synaptic Package Manager
yes, it worked to solve the Firefox code. Upgrade is now successful – great work!