在运行flatpak update
时出现问题,详细内容如下:
~/ flatpak update -v
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/qytlix/.local/share/flatpak
正在查找更新…
F: Fetching summary index file for remote ‘flathub’
F: Loading https://mirror.sjtu.edu.cn/flathub/summary.idx using curl
F: Received 10001 bytes
F: Fetching indexed summary file ba492fff9d67a20e7782fb9c99e89792a48779b3387217bf7fcf65b25b4f9c4d.gz for remote ‘flathub’
F: Loading https://mirror.sjtu.edu.cn/flathub/summaries/ba492fff9d67a20e7782fb9c99e89792a48779b3387217bf7fcf65b25b4f9c4d.gz using curl
F: Received 1328953 bytes
错误: 远程仓库 “flathub” 的已索引摘要 ba492fff9d67a20e7782fb9c99e89792a48779b3387217bf7fcf65b25b4f9c4d 的校验和无效
使用的是上海交大的镜像:
~/ flatpak remotes -d
名称 标题 网址 集合标识 子集 筛选器 优先级 选项 注释 描述 主页 图标
flathub Flathub https://mirror.sjtu.edu.cn/flathub - - - 1 system Cen… Cent… https://flathub.org/ https://dl.flathub.org/repo/logo.svg
去 上交的网站 看了,镜像源看起来一切正常:
请问现在有什么方法可以解决这个问题吗?
抑或是只能等待镜像源恢复正常?
谢谢!
ps:
实际上几天前就已经有人在另外一个网站提问了,但是没有人回帖,因此在这里向大家求助。
这是那个帖子
已经做过的尝试:
wget https://mirror.sjtu.edu.cn/flathub/flathub.gpg
sudo flatpak remote-modify --gpg-import=flathub.gpg flathub
最开始的问题已经解决了
解决方案
使用了最简单粗暴的方法。
步骤一
删除所有的软件:
flatpak uninstall --all
然后删除软件源:
flatpak remote-delete flathub
并且使用zypper
删除了flatpak
:
sudo zypper rm -u flatpak
步骤二
重启,然后重新安装flatpak
:
sudo zypper in flatpak
重新配置软件源 (注意:这一步使用国内的网络速度及其慢,所以要耐心) ,并且切换到上交的镜像:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub
现在flatpak
就恢复正常了。
- 之后安装了一个软件 (Rnote),下述的问题在安装了这个软件之后形成的。*
另:
问题描述:
但是有一点很奇怪,如果使用sudo flatpak update
,而不是使用flatpak update
的话,仍然会有类似上述的报错,详情如下:
~/ sudo flatpak update -v
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /root/.local/share/flatpak
正在查找更新…
F: Fetching summary index file for remote ‘flathub’
F: Loading https://mirror.sjtu.edu.cn/flathub/summary.idx using curl
F: Received 10001 bytes
F: Fetching indexed summary delta e014041a4c25703e54a985d9342be4e0934e9a48ff31d85982dc2063b6e7d898-e3268c7b5199ae774933503a5b5d4473f3073828d8448d998268c710f024e5c2.delta for remote ‘flathub’
F: Loading https://mirror.sjtu.edu.cn/flathub/summaries/e014041a4c25703e54a985d9342be4e0934e9a48ff31d85982dc2063b6e7d898-e3268c7b5199ae774933503a5b5d4473f3073828d8448d998268c710f024e5c2.delta using curl
F: Received 41143 bytes
F: Failed to apply delta, falling back: Invalid summary diff
F: Fetching indexed summary file e3268c7b5199ae774933503a5b5d4473f3073828d8448d998268c710f024e5c2.gz for remote ‘flathub’
F: Loading https://mirror.sjtu.edu.cn/flathub/summaries/e3268c7b5199ae774933503a5b5d4473f3073828d8448d998268c710f024e5c2.gz using curl
F: Received 1329204 bytes
错误: 远程仓库 “flathub” 的已索引摘要 e3268c7b5199ae774933503a5b5d4473f3073828d8448d998268c710f024e5c2 的校验和无效
其中的
F: Failed to apply delta, falling back: Invalid summary diff
是不同于原来问题的报错,但总归是 * 已索引摘要 * 的 * 校验和 * 有问题。
观察flatpak update
的详细情况:
~/ flatpak update -v
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/qytlix/.local/share/flatpak
正在查找更新…
F: Fetching summary index file for remote ‘flathub’
F: Loading https://mirror.sjtu.edu.cn/flathub/summary.idx using curl
F: Received 10001 bytes
F: Loaded indexed summary file e3268c7b5199ae774933503a5b5d4473f3073828d8448d998268c710f024e5c2 from cache for remote ‘flathub’
F: Transaction: update flathub:app/com.github.flxzt.rnote/x86_64/stable[*]
F: Transaction: update flathub:runtime/com.github.flxzt.rnote.Locale/x86_64/stable[/zh]
F: Transaction: update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08[*]
F: Transaction: update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08-extra[*]
F: Transaction: update flathub:runtime/org.freedesktop.Platform.openh264/x86_64/2.4.1[*]
F: Transaction: update flathub:runtime/org.gnome.Platform.Locale/x86_64/46[/zh]
F: Transaction: update flathub:runtime/org.gnome.Platform/x86_64/46[*]
F: Transaction: update flathub:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22[*]
F: Looking for remote metadata updates for flathub
F: marking op update:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22 resolved to 4d3e6a2b859c74c756db45ba238670942b6b3c0ed557bcf828f9800c66ee38cb
F: marking op update:runtime/org.gnome.Platform/x86_64/46 resolved to 4ccc556ce2e9aa381e1d363d9f6e9e07eb81cde87e92597ff9c3bfbb4263b963
F: marking op update:runtime/org.gnome.Platform.Locale/x86_64/46 resolved to c3ccd1c9af93b2856ef1d4a86a0c3a696fbec6a20a7e94d19f0d8e10e903f49a
F: marking op update:runtime/org.freedesktop.Platform.openh264/x86_64/2.4.1 resolved to 50b21d3fc221e861a8573f642bd3e582453b68c8be9962614461ee4d1b0ea38e
F: marking op update:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08-extra resolved to d64b09e6ab6999efdda4a655853cfca8432335ff680d0072793433d957ee3921
F: marking op update:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08 resolved to 0417ef24351ecbb9208216510d7190ce94aa483f812b713b9b00e4ff5987b968
F: marking op update:runtime/com.github.flxzt.rnote.Locale/x86_64/stable resolved to 5db66a51844ff575c60be7caf74cc1f9fd9106e9072335dfa32c4b6668aeeed7
F: marking op update:app/com.github.flxzt.rnote/x86_64/stable resolved to b8c78c674198c9aa9f3e8f012ca339aa3f2747b74ca01e0c389629d5895d9954
F: Transaction: install/update flathub:runtime/org.gnome.Platform.Locale/x86_64/46[/zh]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.GL.default/x86_64/23.08-extra[*]
F: Transaction: install/update flathub:runtime/org.gtk.Gtk3theme.Breeze/x86_64/3.22[*]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.openh264/x86_64/2.4.1[*]
F: Transaction: install/update flathub:runtime/com.github.flxzt.rnote.Locale/x86_64/stable[/zh]
F: Checking installation ‘system’ for EOL unused refs and autoprunes
F: Checking installation ‘system’ by checking for dependent refs in ‘user’
无事可做。
F: flathub:x86_64 appstream age 2346 is Less than ttl 86400
可以发现有这样一行:
F: Loaded indexed summary file e3268c7b5199ae774933503a5b5d4473f3073828d8448d998268c710f024e5c2 from cache for remote ‘flathub’
似乎 * 已索引摘要 * 的 * 校验和 * 又可以通过检验了。
结论:
我对于sudo
的原理不是很了解,但很可能是sudo
的问题。
之后只好每次更新安装时输密码了。(笑)
能力不足,若有精通此道之人解答疑惑或者给出解决方案,将不胜感激。
1赞