2

This is a follow-up on this question, which is about why it is so troublesome to add Flatpak's PPA to the repositories.

I have now added the PPA and the public key, so that I could run sudo apt-get update successfully.

Yet, both commands

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

and

flatpak install (software reference)

result in the console to wait for a long while and then output:

**error:** Can't load uri https://flathub.org/repo/flathub.flatpakrepo: Could not connect: Network is unreachable

I've been able to reproduce this on both my company's laptop and my own (both running Ubuntu 18.04).

1 Answers1

3

I highly recommend removing your flatpak related ppa's and following the steps outlined on the flatpak site

To Remove PPA you can use the GUI Interface or looking the source list and running a command.

To remove PPAs using GUI

  • Go to Software Sources and click the tab Other Software
  • Highlight each ppa you want removed and click remove
  • run sudo apt update after you are done

To remove PPAs using Source List

  • open terminal
  • type the following command sudo ls /etc/apt/sources.list.d
  • Look for your desire PPA here and then remove the PPA using the following command: sudo rm -i /etc/apt/sources.list.d/PPA_Name.list
  • when done ton sudo apt update in terminal

To Install Flatpak

  1. for Ubuntu older than 18.10 and 19.04

    sudo add-apt-repository ppa:alexlarsson/flatpak
    sudo apt update
    sudo apt install flatpak
    
  2. Install the Software Flatpak plugin

    sudo apt install gnome-software-plugin-flatpak
    
  3. Add the Flathub repository

    flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    

Additionally, on Ubuntu 20.04 you may remove the pre-installed Snap Store by

snap remove snap-store
Pablo Bianchi
  • 15,657
dh-tech
  • 51
  • Oh. I read in your answer "older than 18.10". I was not aware of that. If correct, that explains why I'm having trouble with 18.04. – Arnaud Mortier Sep 26 '19 at 15:05
  • 1
    It can be easily missed on the flatpak setup guide site https://flatpak.org/setup/Ubuntu/ Hope this resolves your issue – dh-tech Sep 26 '19 at 15:28
  • I must have been really tired when I wrote the above comment. 18.04 is older than 18.10, and the command that you write here is what I've tried at the very beginning. It resulted in the console to think for ages, and that's why I've been trying to find other ways to add the PPA as explained in this other question. – Arnaud Mortier Sep 26 '19 at 20:57