Views:
9,344β
Votes: 3β
β
Solution
Tags:
software-installation
firefox
deb
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1502032
Title:
How to install Firefox directly from Mozilla with `apt`?
ID:
/2024/02/01/How-to-install-Firefox-directly-from-Mozilla-with-_apt__
Created:
February 1, 2024
Edited: August 8, 2024
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
If you are using snap
version you need to remove it first. Note an Ask Ubuntu post says you will lose your bookmarks:
sudo snap remove firefox
Mozilla has instructions on their website for installing the latest .deb
version directly:
Note: Step 3 below didnβt work for me. Although itβs not a mandatory step, If it doesnβt work for you, an alternative is shown beneath last step.
-
Create a directory to store APT repository keys if it doesnβt exist:
sudo install -d -m 0755 /etc/apt/keyrings
-
Import the Mozilla APT repository signing key:
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null
``` If you do not have
wget
installed, you can install it with:
sudo apt-get install wget
3. The fingerprint should be 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3. *See note below if this doesn't work.*
``` shell
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}'
-
Next, add the Mozilla APT repository to your sources list:
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null
-
Configure APT to prioritize packages from the Mozilla repository:
echo ' Package: * Pin: origin packages.mozilla.org Pin-Priority: 1000 ' | sudo tee /etc/apt/preferences.d/mozilla
-
Update your package list and install the Firefox .deb package:
sudo apt-get update && sudo apt-get install firefox
```
```
Alternate method for Step 3.
To get the fingerprint in step 3 I used:
gpg --with-fingerprint /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}'
Key fingerprint = 35BA A0B3 3E9E B396 F59C A838 C0BA 5CE6 DC63 15A3
Summary
This worked well for Ubuntu 16.04 ESM on January 31, 2024 but others report itβs working well for all modern Ubuntu versions.
There was no need to remove the old version 88 before installing the new version 122.
I was quite happy on-line banking and other advanced websites now work without having to resort to using Chromium. I keep Chromium around for Selenium and Google Messages Web but, I still donβt want to fire it up just to access a modern website.
Further reading from OMG Ubuntu: