安装 Flatpak 1.6.2 后出现问题

安装 Flatpak 1.6.2 后出现问题

我在 Chromebook 上的 Crouton 中使用 Ubuntu 18.04,并尝试安装 Flatpak。安装过程中一切顺利,但我无法从 flathub 下载任何内容,而且每次我尝试使用 flathub 执行某些操作时,都会出现错误。

现在我尝试安装 Spotify 应用程序,它说

无法从 flathub 安装“com.spotify.Client”:尝试应用额外数据时:apply_extra 脚本失败,退出状态 256

我在互联网上没有找到任何关于此的信息。我用本教程安装 Flatpak 1.6.2(如果这是有用的信息)。

我能做些什么?

答案1

我做了什么让它在 19.10 上运行

$ sudo add-apt-repository ppa:alexlarsson/flatpak
$ sudo apt install flatpak
The following NEW packages will be installed:
  flatpak libostree-1-1

sudo apt install gnome-software-plugin-flatpak
The following NEW packages will be installed:
  gnome-software-plugin-flatpak libflatpak0

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/spacer/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

$ echo $XDG_DATA_DIRS
/usr/share/ubuntu-wayland:/usr/local/share:/usr/share:/var/lib/snapd/desktop

$ flatpak install flathub com.spotify.Client

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/spacer/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for matches…
Required runtime for com.spotify.Client/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/19.08) found in remote flathub
Do you want to install it? [Y/n]: 

com.spotify.Client permissions:
    ipc           network              pulseaudio          x11
    dri           file access [1]      dbus access [2]     bus ownership [3]
    tags [4]

    [1] xdg-music:ro, xdg-pictures:ro
    [2] org.freedesktop.Notifications, org.gnome.SessionManager,

        ID                                     Branch   Op   Remote    Download
 1. [✓] org.freedesktop.Platform.GL.default    19.08    i    flathub    93,1 MB / 92,6 MB
 2. [✓] org.freedesktop.Platform.Locale        19.08    i    flathub     3,2 MB / 318,2 MB
 3. [✓] org.freedesktop.Platform.VAAPI.Intel   19.08    i    flathub     8,6 MB / 8,7 MB
 4. [✗] org.freedesktop.Platform.openh264      19.08    i    flathub   594,2 kB / 593,4 kB
 5. [✓] org.gtk.Gtk3theme.Yaru-light           3.22     i    flathub   153,5 kB / 207,6 kB
 6. [✓] org.freedesktop.Platform               19.08    i    flathub   244,3 MB / 238,1 MB
 7. [✓] com.spotify.Client                     stable   i    flathub   135,7 MB / 131,9 MB

Warning: org.freedesktop.Platform.openh264 not installed
Installation complete.

$ flatpak install flathub org.freedesktop.Platform.openh264/x86_64/19.08

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/spacer/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

Looking for matches…


        ID                                   Branch    Op    Remote    Download
 1. [✓] org.freedesktop.Platform.openh264    19.08     i     flathub   593,6 kB / 593,4 kB

Installation complete.

$ flatpak run com.spotify.Client

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/spacer/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

/app/extra/bin/spotify: /app/lib/libcurl-gnutls.so.4: no version information available (required by /app/extra/bin/spotify)
Gtk-Message: 19:58:38.385: Failed to load module "atk-bridge"
Gtk-Message: 19:58:38.423: Failed to load module "canberra-gtk-module"
/app/extra/share/spotify/spotify: /app/lib/libcurl-gnutls.so.4: no version information available (required by /app/extra/share/spotify/spotify)
/proc/self/exe: /app/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
/proc/self/exe: /app/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)

Spitify 启动成功: spotify窗口

检查从$符号开始的命令是否已执行。

另外,您可以尝试创建新用户:

sudo adduser newuser && sudo usermod -aG sudo newuser

使用它登录并重试。

相关内容