Ubuntu – How to have flatpak do anything

flatpak

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).

Best Answer

  • 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 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 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

    Hope this works out for you