How to install the real Firefox on Debian?

129

54

Debian 6 ("Squeeze") uses a rebranded version of Firefox called Iceweasel. It, however, lacks plugin support, and most of my favorites don't work.

So what is best way to install the "real" Firefox on Debian?

kravemir

Posted 2011-08-12T14:26:20.247

Reputation: 2 447

Answers

130

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

Breakthrough

Posted 2011-08-12T14:26:20.247

Reputation: 32 927

2I never recommend this solution. In fact adding such repository (although it is based on the same distro) can cause conflict in dependencies. This method works for installing and updating firefox, but it does make some conflicts with other packages. If you need the firefox, you just get the code and extract it in your /opt/ and create a global link to it. – orezvani – 2014-08-01T12:47:08.363

@Breakthrough How to subsequently update this install?I tried to install to FF33.0 from FF30.0 and lost my installed addons. – techie_28 – 2014-10-31T09:06:54.333

E: Package 'firefox' has no installation candidate – Dr.jacky – 2015-06-24T11:41:48.173

1

Be aware! (http://forums.debian.net/viewtopic.php?f=5&t=119719) Don't mix Debian with Mint.

– Dr Beco – 2015-07-05T01:14:26.350

@emab That's what I did, it's easier than track packages. I don't know if the libraries involved are from debian repos or mint ones... this detail is the key. Arguing that every other package will be found on original repos, you can add it, install firefox then remove the ppa later. Otherwise the best option is to use /opt. – m3nda – 2016-04-12T19:33:14.007

@Dr Mint is built from Ubuntu, and Ubuntu from Debian. It's really a bad idea to mix them :D – m3nda – 2016-04-12T19:34:31.367

1Definitely easier than what I suggested. – Simon Sheehan – 2011-08-12T14:53:43.513

1Bah, got no notification that you were writing -- beat me to it :P – slhck – 2011-08-12T15:01:01.467

4What about GPG signature of that repository? – kravemir – 2011-08-13T14:10:10.950

Done that. It's Dutch language version- any ideas how to make it English? – Leo – 2012-07-30T19:30:10.410

@nodiscc that's the default repository included with Debian to begin with... If you look at the linked repository in that answer, it only has Iceweasel, not Firefox (as the OP requested). If you are really against using another popular Linux distribution's repository, you might want to consider adding the Daily-Built Ubuntu Firefox/Thunderbird PPA.

– Breakthrough – 2012-12-21T17:24:51.383

This really is a testament to the beauty of Debian ... there's many ways to tweak your build ... I ♥ Debian ... ;-) – Eddie B – 2012-12-21T20:06:07.217

Might want to just get rid of the version number - it changes so fast now. – Simon Sheehan – 2012-12-22T04:41:07.263

Where can I verify the GPG signature of the package? – Redsandro – 2013-04-01T01:56:02.840

7

Ad GPG: downloading and manually (dpkg -i) installing linuxmint-keyring_*.deb from Mint's repo (before installing any package from actual repo) worked for me (Wheezy).

– Alois Mahdal – 2013-04-04T16:03:09.833

For those missing the icon, google "mozicon128.png" and save it as /usr/share/pixmaps/firefox.png – Justin Sane – 2013-12-13T16:43:08.067

@JustinSane The icon can be also found somewhere under /opt/firefox, so you can simply copy it ... or fix all .desktop files to point to the /opt/... path (in case you don't have permissions). – Alois Mahdal – 2014-01-10T12:02:39.550

33

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.

Manuel Garza

Posted 2011-08-12T14:26:20.247

Reputation: 331

+1 for the --keyserver stuff! Actually iceweasel not needed to be removed. I was afraid that the settings and saved passwords would be lost, so I kept iceweasel. – TrueY – 2014-12-15T21:25:20.637

+1 Thanks! @TrueY Iceweasel works even with FireFox installed? I had already uninstalled iceweasel and when I try to install it (in Kali 2.0,) I get an error that it clashes with firefox: diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel' clashes withdiversion of /usr/bin/firefox to /usr/bin/firefox.ubuntu by firefox-mozilla-build` I wonder if I hadn't uninstalled it, if they would have played well together? – Garrett Fogerlie – 2015-09-06T00:54:14.493

@GarrettFogerlie I think they cannot run parallel. I had a Firefox running and I tried to start Iceweasel and I got a message box with the following text: "Iceweasel is already running, but is not responding. To open a new window, you must first close the existing Iceweasel process, or restart your system." – TrueY – 2015-09-06T20:50:01.127

1No longer works! – Naveen Dennis – 2018-05-22T14:47:31.733

1Works like charm! – Yordan Pavlov – 2013-05-18T22:10:13.253

24

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.

Simon Sheehan

Posted 2011-08-12T14:26:20.247

Reputation: 8 641

1Two updates! First... ln -sf /opt/firefox/firefox /usr/bin/firefox # force the symlink ... The other is the icon path on the firefox.desktop is now in another location: ls /opt/firefox/browser/icons/mozicon128.png – mimoralea – 2014-12-15T13:04:36.190

i did all the steps but i have no permission of open firefox. any ideas? – jaorizabal – 2013-11-02T02:27:03.533

>ln -s /opt/firefox/firefox /usr/bin/firefox

ln: failed to create symbolic link `/usr/bin/firefox': File exists – miguel – 2014-04-19T21:57:17.073

1Turns out debian put a shell script at /usr/bin/firefox that executes iceweasel. Dick move. – miguel – 2014-04-19T22:01:01.037

@miguel This post is very old, not sure how valid it is still – Simon Sheehan – 2014-04-20T16:04:48.680

6

No need for this any more. Debian stable started shipping Firefox instead of iceweasel today.

Debian will ship the Extended Support Release (ESR) of Firefox, which is roughly updated every 9 months. If you always need the latest version the others answers may stil be an option for you.

For more infomarmation see the debian bug report

hennr

Posted 2011-08-12T14:26:20.247

Reputation: 334

6

Iceweasel Aurora is very close to Firefox latest stable release.

I installed Iceweasel Aurora using this official debian/mozilla tutorial.

I was able to import my Firefox profile from another installation without errors, ie, all addons, bookmarks, history entries and user settings are working perfectly.

FYI, some of the plugins I use are Firebug, Awesome screenshot and Searchstatus, all worked fine and were not disabled by Iceweasel.

You may also want to use the Firefox logo for launchers.

This is probably a better option as it allows an easier update process.

Nabil Kadimi

Posted 2011-08-12T14:26:20.247

Reputation: 178

4

For the Googlers... this works for Debian Jessie:

#Add GnuPG archive key for mozilla.debian.net repository to the list of trusted keys
wget -q -O - http://mozilla.debian.net/archive.asc | sudo apt-key add -

Depending on the version you want (pick one),

  • Release version:

    cat << EOF | sudo tee /etc/apt/sources.list.d/mozilla-firefox.list
    deb http://mozilla.debian.net/ jessie-backports firefox-release
    EOF
    
  • Beta version:

    cat << EOF | sudo tee /etc/apt/sources.list.d/mozilla-firefox.list
    deb http://mozilla.debian.net/ jessie-backports firefox-beta
    EOF
    
  • Aurora version:

    cat << EOF | sudo tee /etc/apt/sources.list.d/mozilla-firefox.list
    deb http://mozilla.debian.net/ jessie-backports firefox-aurora
    EOF
    

Then:

#Assign higher priority to recently added repository.    
cat << EOF | sudo tee /etc/apt/preferences.d/mozilla-firefox
Package: *
Pin: origin mozilla.debian.net
Pin-Priority: 501
EOF

apt-get update && apt-get install firefox

Source: https://blog.sleeplessbeastie.eu/2016/03/21/how-to-use-recent-version-of-firefox-in-debian-jessie/

Motsel

Posted 2011-08-12T14:26:20.247

Reputation: 596

2Just FYI, Iceweasel wasn't renamed to Firefox, as premised in the link. Iceweasel was a sanitized, rebranded version of Firefox. The Iceweasel project was discontinued and now actual Firefox is what is distributed with Debian. If Jessie still has Iceweasel ESR, that will be gone as soon as the ESR version is deprecated. Debian stable (currently Jessie), will have Firefox ESR. This has a major release roughly once/year, with security updates but not feature changes in between. Debian Testing should already have standard, current-release Firefox – fixer1234 – 2016-05-20T00:39:31.367

Cleanest way to get it right from the source. +1 for the key – Somaiah Kumbera – 2016-09-30T13:03:52.093

3

This method is working for me on Debian 9 Stretch (64bit):

cd ~/Downloads

/usr/bin/curl -L -o firefox-latest-linux64.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" && sudo tar xvf firefox-latest-linux64.tar.bz2 -C /opt/ && rm firefox-latest-linux64.tar.bz2

sudo ln -sf /opt/firefox/firefox /usr/bin/firefox

You can set something like this in your root's crontab for @daily or @weekly

The download link was derived from this Mozilla readme.txt: https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/README.txt

nd34567s32e

Posted 2011-08-12T14:26:20.247

Reputation: 101

Pretty straightforward – Pierre de LESPINAY – 2018-03-21T09:55:17.677

beautiful! works from the command line with no customization. – honi – 2018-03-27T00:35:42.493

2

First edit your /etc/apt/sources.list file to include:

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

Update system repositories:

$ apt-get update

You may get and ignore a following error:

W: GPG error: http://packages.linuxmint.com debian Release:
The following signatures couldn't be verified because the public
key is not available: NO_PUBKEY 3EE67F3D0FF405B2

Once system's repositories are updated simply use apt-get command to install Firefox Browser on your Debian Jessie 8 Linux:

$ apt-get install firefox

Reading package lists... Done                                                                                                                                                                             
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
firefox
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 40.8 MB of archives.
After this operation, 89.9 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
firefox
Install these packages without verification? [y/N] y

Once the installation is finished you can start Firefox either from command line:

$ firefox

GURUVEER

Posted 2011-08-12T14:26:20.247

Reputation: 21

This is no longer necessary. Iceweasel has been discontinued and Firefox is now what is provided by Debian. Iceweasel ESR was associated with Debian Stable, and that will disappear when the old ESR version is deprecated shortly. In the meantime, Firefox is available in Jessie via backport. – fixer1234 – 2016-05-04T17:25:22.490

0

Below is the most straight forward method I've found for replacing Iceweasel with Firefox in Debian.

Wiki >>> Ubuntuzilla: Mozilla Software Installer

The terminal commands are as follows:

:~$ sudo apt remove iceweasel

:~$ sudo nano /etc/apt/sources.list

Add the following entry to the source.list file:

deb https://sourceforge.net/projects/ubuntuzilla/files/ all main

Save and exit Nano.

:~$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29

:~$ sudo apt update

:~$ sudo apt install firefox-mozilla-build

I hope this will be of help to anyone else wanting to replace Iceweasel with the current version of Firefox. As far as I have seen, the source is very well documented and maintained.

Rick Lell

Posted 2011-08-12T14:26:20.247

Reputation: 31

This looks like a duplicate of Manuel Garza's answer. – fixer1234 – 2016-02-25T21:27:13.437

You're right. I found Ubuntuzilla as I was seeking an answer myself. I didn't see Manuel Garza's answer above, though I wish I had, as this would have saved me some time. Iceweasle isn't playing html5 video and this is how I fixed it. I love Debian, so actually switching to Ubuntu isn't an option. Thanks for the heads up as to being a duplicate. – Rick Lell – 2016-02-26T04:48:44.330

0

The following works for me:

$ sudo apt-get install firefox-esr

The -esr apparently means Extended Support Release.

Quinn

Posted 2011-08-12T14:26:20.247

Reputation: 1

0

I'm running an AMD Athlon II X2 system. Firefox runs perfectly on Wheezy i686 & the 3.2.0-4-686-pae kernel. The stock version of IceWeasel just seemed gutted, crippled and inferior compared to Firefox. Installation is a snap. I download the newest Firefox to /home/myusername/Linux/Software/Mozilla/current/, and then run

cd /opt
sudo rm -R firefox*
sudo cp /home/myusername/Linux/Software/Mozilla/current/firefox* /opt
sudo tar jxvf firefox*

The second line removes the previous version completely before the upgrade.

akdb2004

Posted 2011-08-12T14:26:20.247

Reputation: 1

2sudo rm -R firefox* seems quite dangerous, what if you had other firefox* folders in /opt? – Alois Mahdal – 2013-04-21T19:04:25.600