无法在 Arch Linux 上安装 flatpak

问题描述

[试图] 在 Arch linux 上安装 flatpak 失败:

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

在 Linux 上下载和安装 flatpack 的正确方法是什么?

解决方法

先运行 sudo pacman -Syy 解决

,

请注意,不建议在 -Sy-Syy 之后安装单个软件包。如果您需要使用 -y 更新镜像以安装软件包,您应该将其与完整系统升级 -u 结合使用:

sudo pacman -Syu flatpak

您可能不会看到 -Sy <package> 立即损坏,但最终会随着继续使用而损坏。如果 <package> 碰巧引入了新的 lib 版本,则任何依赖于这些 lib 的程序都 will break since they will still be built against the old libs