You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Ubuntu 23.10移除Snap安装Flatpak后出现Flatpak PPA仓库错误的求助

Ubuntu 23.10移除Snap安装Flatpak后出现Flatpak PPA仓库错误的求助

我的操作背景与当前状态

我把Snap完全移除后安装了Flatpak,现在通过flatpak list查看,已安装的包如下:

名称应用ID版本分支安装位置
Freedesktop Platformorg.freedesktop.Platform22.08.2022.08system
Freedesktop Platformorg.freedesktop.Platform23.08.1023.08system
Mesaorg.freedesktop.Platform.GL.default23.3.022.08system
Mesa (Extra)org.freedesktop.Platform.GL.default23.3.022.08-extrasystem
Mesaorg.freedesktop.Platform.GL.default23.3.223.08system
Mesa (Extra)org.freedesktop.Platform.GL.default23.3.223.08-extrasystem
openh264org.freedesktop.Platform.openh2642.1.02.2.0system
Freedesktop SDKorg.freedesktop.Sdk23.08.1023.08system
Greenfootorg.greenfoot.Greenfoot3.8.2stablesystem
Yaru-prussiangreenorg.gnome.themes.Yaru-prussiangreen-3.22system
Yaru-prussiangreen-darkorg.gnome.themes.Yaru-prussiangreen-dark-3.22system
KDE Application Platformorg.kde.Platform-5.15-23.08system
QGnomePlatformorg.kde.PlatformTheme.QGnomePlatform-5.15-23.08system
QAdwaitaDecorationsorg.kde.WaylandDecoration.QAdwaitaDecorations-5.15-23.08system
QGnomePlatform-decorationorg.kde.WaylandDecoration.QGnomePlatform-decoration-5.15-23.08system
Firefoxorg.mozilla.firefox121.0stablesystem
Thonnyorg.thonny.Thonny4.1.4stablesystem
VLCorg.videolan.VLC3.0.19stablesystem
Bluray Java moduleorg.videolan.VLC.Plugin.bdj-3-23.08system
FDK-AAC Encoderorg.videolan.VLC.Plugin.fdkaac-3-23.08system
Pause Click pluginorg.videolan.VLC.Plugin.pause_click2.2.03-23.08system

我的疑问与遇到的问题

  1. 有点惊讶Thonny在列表里,因为当时软件中心明明显示安装失败了...
  2. 顺便问个小问题:&&是不是管道符的另一种写法?我一直有点搞不清。

核心问题是,每次运行apt update都会弹出这个错误:

E: The repository 'https://ppa.launchpadcontent.net/flatpak/stable/ubuntu mantic Release' does not have a Release file.

我尝试过运行sudo add-apt-repository main restricted universe multiverse,但更新时还是报同样的错,完整的更新输出如下:

Adding component(s) 'main, restricted, universe, multiverse' to all repositories.
Press [ENTER] to continue or Ctrl-c to cancel.

Hit:1 http://gb.archive.ubuntu.com/ubuntu mantic InRelease
Hit:2 http://gb.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:4 http://security.ubuntu.com/ubuntu mantic-security InRelease
Hit:5 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 https://repo.protonvpn.com/debian stable InRelease
Hit:7 http://gb.archive.ubuntu.com/ubuntu mantic-backports InRelease
Hit:8 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:9 https://packages.element.io/debian default InRelease
Ign:10 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu mantic InRelease
Hit:11 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:12 https://ppa.launchpadcontent.net/qbittorrent-team/qbittorrent-stable/ubuntu mantic InRelease
Err:13 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu mantic Release
404  Not Found [IP: 185.125.190.80 443]
Reading package lists... Done

E: The repository 'https://ppa.launchpadcontent.net/flatpak/stable/ubuntu mantic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

这个PPA应该是安装Flatpak时自动添加的,目前Flatpak本身用着还行,就是apt下载有点慢(我看资料说这是Flatpak的正常情况),偶尔会崩溃——Firefox也偶尔崩,所以我怀疑是不是缺某些系统包,但找了很多指南,都没有针对“Ubuntu 23.10完全移除Snap后Flatpak PPA报错”的情况,不确定那些通用方案适不适用。

另外移除Snap后我的网速变慢了,不过这个我打算另开提问,只是提一下不确定是否和当前问题有关。移除Snap时我用了命令阻止apt下载Snap更新,还修改了文件防止Snap更新插入到Firefox,所以肯定不是Snap相关的操作导致这个错误的。

最后还有个小问题:有没有qtube-dl或者playlist-dl的Flatpak版本?


解决方案与答疑

核心PPA错误的解决

这个错误的根源是Flatpak的stable PPA并没有为Ubuntu 23.10(mantic)提供支持,Launchpad上的这个PPA只维护到Ubuntu 22.04(jammy),所以mantic版本的Release文件根本不存在,才会触发apt报错。你可以按以下步骤修复:

  1. 先移除这个无效的PPA:
    sudo add-apt-repository --remove ppa:flatpak/stable
    
  2. 其实Ubuntu官方仓库已经自带Flatpak包了,完全不需要第三方PPA,移除后直接用官方源维护即可:
    sudo apt update && sudo apt install --reinstall flatpak
    
  3. 如果需要在软件中心里浏览Flatpak应用,可以安装对应的插件:
    sudo apt install gnome-software-plugin-flatpak
    

其他疑问解答

  • Thonny出现在列表里的原因:可能是你尝试安装时,Flatpak已经在后台完成了安装,但软件中心的界面状态没同步,这种小bug偶尔会发生。你可以运行flatpak run org.thonny.Thonny测试能不能正常打开。
  • &&和管道符的区别&&不是管道符哦!它的作用是只有前面的命令执行成功(返回码为0),才会执行后面的命令;而管道符|是把前面命令的输出作为后面命令的输入,两者的用途完全不同。
  • qtube-dl/playlist-dl的Flatpak版本:目前Flatpak官方仓库里没有这两个工具的包,不过你可以用pip安装它们(毕竟都是Python脚本),或者看看类似的替代工具——比如yt-dlp有更活跃的维护,你也可以找找它的Flatpak版本。

关于Flatpak偶尔崩溃的建议

你同时安装了22.08和23.08两个版本的Freedesktop Platform运行时,多版本运行时可能会引发冲突,导致应用崩溃。你可以运行flatpak uninstall --unused清理掉未被任何应用使用的运行时和依赖,应该能改善这种情况。

备注:内容来源于stack exchange,提问作者user1754367

火山引擎 最新活动