2

I upgraded from Ubuntu 20.04 to 22.04 the other day and immediately found myself unable to use ExpressVPN on Firefox. (As I understand now, it seems to be only the browser extension that I cannot use.)

I sought help from ExpressVPN, and they advised me to remove the snap version of Firefox and install the apt version instead using these instructions:

Step 1: Let's use Firefox PPA: sudo add-apt-repository ppa:mozillateam/ppa

Step 2: Then, copy and paste the following code in a terminal in one go (don't copy-paste line by line) to prioritize the apt version of firefox with the snap version.

echo '
Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001
' | sudo tee /etc/apt/preferences.d/mozilla-firefox

Step 3: Next, remove the snap version of firefox: sudo snap remove firefox

Step 4: Install Firefox with apt.: sudo apt install firefox

As a result, I was not able to install the apt version of Firefox (Step 4 failed) and now I cannot update anything on the system. In both cases, I get the error message:

Reading package lists... Done
E: Invalid record in the preferences file
/etc/apt/preferences.d/mozilla-firefox, no Package header

@Rinzwind, the content of /etc/apt/preferences.d/mozilla-firefox is:

Package: *
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 1001

@steeldriver, the output of apt-cache policy | grep -A1 mozillateam | cat -A is:

E: Invalid record in the preferences file /etc/apt/preferences.d/mozilla-firefox, no Package header
500 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main i386 Packages$ release v=22.04,o=LP-PPA-mozillateam,a=jammy,n=jammy,l=Firefox ESR and Thunderbird stable builds,c=main,b=i386$ origin ppa.launchpadcontent.net$
500 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages$ release v=22.04,o=LP-PPA-mozillateam,a=jammy,n=jammy,l=Firefox ESR and Thunderbird stable builds,c=main,b=amd64$ origin ppa.launchpadcontent.net$

It's been several days now and ExpressVPN don't provide a solution. Can anyone help me "undo" what they instructed me to do? I figure I am better off re-installing the snap version of Firefox and using ExpressVPN via command line.

Thanks for any advice.

6
  • 1
    Show us the content of /etc/apt/preferences.d/mozilla-firefox There is a mistake in there somewhere. Add it to the question please Oh and I see a flaw too: somewhere you need to do sudo apt update
    – Rinzwind
    Aug 15, 2022 at 16:42
  • Can you tell me exactly how to do that? (I'm sorry, I'm a newbie.)
    – Oryza
    Aug 15, 2022 at 16:51
  • it is more /etc/apt/preferences.d/mozilla-firefox
    – Rinzwind
    Aug 15, 2022 at 17:40
  • @Oryza can you also add the output of apt-cache policy | grep -A1 mozillateam | cat -A please? Aug 15, 2022 at 20:46
  • "Can anyone help me "undo" what they instructed me to do?" remove /etc/apt/preferences.d/mozilla-firefox and the error is gone
    – Rinzwind
    Aug 15, 2022 at 21:49

1 Answer 1

1

I had this issue and it was caused by instructions saying to echo -e "" the contents of /etc/apt/preferences.d/blah

The problem was that the version of bash in the container didn't support -e and so -e was being inserted at the start of the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .