Unable to install flatpak on Arch Linux

2.6k Views Asked by At

[Trying to] Installing flatpak on Arch linux fails:

$ sudo pacman -S flatpak
resolving dependencies...
:: There are 3 providers available for xdg-desktop-portal-impl:
:: Repository extra
   1) xdg-desktop-portal-gtk  2) xdg-desktop-portal-kde
:: Repository community
   3) xdg-desktop-portal-wlr

Enter a number (default=1): 1
looking for conflicting packages...

Packages (11) appstream-glib-0.7.18-1  gcab-1.4-1  geoclue-2.5.7-3  geocode-glib-3.26.2-1
              gnome-desktop-1:40.0-1  gnome-keyring-1:40.0-1  libstemmer-0+713-2  ostree-2021.1-1
              xdg-desktop-portal-1.8.0-1  xdg-desktop-portal-gtk-1.8.0-1  flatpak-1.10.2-1

Total Download Size:    0.63 MiB
Total Installed Size:  29.29 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
error: failed retrieving file 'ostree-2021.1-1-x86_64.pkg.tar.zst' from mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file 'ostree-2021.1-1-x86_64.pkg.tar.zst' from mirrors.evowise.com : The requested URL returned error: 404
error: failed retrieving file 'ostree-2021.1-1-x86_64.pkg.tar.zst' from mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file 'ostree-2021.1-1-x86_64.pkg.tar.zst' from mirror.rackspace.com : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

What's the correct way to download and install flatpack on Linux?

4

There are 4 best solutions below

0
On BEST ANSWER

Note that it is not advisable to install an individual package after -Sy or -Syy. If you need to update your mirrors with -y to install a package, you should combine it with a full system upgrade -u:

sudo pacman -Syu flatpak

You might not see immediate breakage with -Sy <package>, but eventually something will break with continued use. If <package> happens to pull in new lib versions, then any program that depends on those libs will break since they will still be built against the old libs.

0
On

Solved it with running sudo pacman -Syy first

0
On

This is sometimes happen. you can solve it using pacman -Syu flatpak. If it didn't solve then you have to change your repository server either from /etc/pacman or /etc/pacman.d/mirrorlist.

0
On

Update the system with pacman -Syu and try again

buy I highly recommend going with AUR packages