How to install the real Firefox on Debian?

First, you need to remove the existing Iceweasel package (I think you can use aptitude as well):

apt-get remove iceweasel

Then, download the latest Linux build of Firefox directly from Mozilla. Extract the files, and navigate to that folder, and run it. If you want, make an icon on your desktop, and you can also make a link to the binary in /usr/bin/firefox to make it easier to launch. If you have root access, you can also install Firefox in /usr/local so all users will be able to run it.

After this, double-check that automatic updates are enabled, and you should be up and running!


If you want a package-based one, you can use Linux Mint's Debian package repo (as noted in the comments below, be aware that this may cause conflicts with automatic updates and other Debian packages in some cases). To do this, add the following line to your /etc/apt/sources.list file:

deb http://packages.linuxmint.com debian import

And add the GPG key for that repo. Then, just run:

apt-get update
apt-get install firefox

And you should be good to go!

The default install is German, to install in any other language, you can manually run:

apt-get install firefox-l10n-en-us 

(Edit[11/26/2014]: This package no longer appears in the linux mint repository.)
(Edit[11/26/2014]: apt-get install firefox-l10n-en-gb - This is the only working English package)

Packages names for other common langages include (official repository list - scroll half way down):

 firefox-l10n-en-gb       # British English
 firefox-l10n-es          # Spanish
 firefox-l10n-fr          # French
 firefox-l10n-de          # German

There's a sourcefourge project, basically dedicated to allowing you to get the latest version of Firefox when running Ubuntu, no matter which version you run (as long as dependencies are satisfied, obviously). Since Ubuntu is a Debian derivative, I thought I'd try it. I've got Firefox working on Debian Testing ("Wheezy") just fine.

Run this:

apt-get remove iceweasel
echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
apt-get update
apt-get install firefox-mozilla-build

This resolves the GPG key issue that is encountered when using the imported Linux Mint DE repository, and is significantly simpler than the other viable solution. Also, this gives you access to Thunderbird and SeaMonkey as well.

Note that this solution only gives you the English-US Release Channel version (no beta or Aurora builds). Other languages can be used, but additional steps are required.

See the project page at Ubuntuzilla for more information.


This post on the Debian User forums suggests the following:

  • Download latest Firefox from: http://www.mozilla.com . If using wget, remember to escape any & with \ so it doesn't break the url down into a series of background process
  • Copy the downloaded file to /opt
  • Extract it using:

    $ tar -jxvf firefox-x.x.xx.tar.bz2
    
  • Change the permissions of the file:

    $ chown -R root:users /opt/firefox
    
    $ chmod 750 /opt/firefox
    

    Note that the user should be a group member of "users"

    $ usermod -a -G users username
    
  • Create a symbolic link

    $ ln -s /opt/firefox/firefox /usr/bin/firefox
    
  • Delete firefox-x.x.xx.tar.bz2 from /opt

To install new versions, you are supposed to

# rm -rf /opt/firefox*
# rm /usr/bin/firefox

To make a desktop icon, do this

$ touch /usr/share/applications/firefox.desktop

Edit this using your favourite text editor:

$ nano /usr/share/applications/firefox.desktop

Contents of firefox.desktop:

[Desktop Entry]
Encoding=UTF-8
Name=Mozilla Firefox
Comment=Browse the World Wide Web
Type=Application
Terminal=false
Exec=/usr/bin/firefox %U
Icon=/opt/firefox/icons/mozicon128.png
StartupNotify=true
Categories=Network;WebBrowser;

You can remove iceweasel with

$ apt-get remove iceweasel

If you encounter this error:

./firefox: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

You should probably install

apt-get install ia32-libs ia32-libs-gtk

Chances are that you are trying to install the 32 bit version of firefox in a 64 bit Debian environment.