Ubuntu 23.10下Snap启动缓慢问题求助:xdg-document-portal因缺失FUSE_3.12无法启动
Ubuntu 23.10下Snap启动缓慢问题求助:xdg-document-portal因缺失FUSE_3.12无法启动
最近我碰到了一个头疼的问题:所有Snap应用启动都特别慢。用--trace-exec参数运行Snap程序时,日志开头总会弹出这条警告:
2024/01/05 18:13:22.350176 cmd_run.go:1055: WARNING: cannot start document portal: Failed to activate service 'org.freedesktop.portal.Documents': timed out (service_start_timeout=120000ms)
看起来问题和xdg-desktop-portal有关,我查到有人通过修复.local/share/flatpak目录的权限解决过类似问题,但我系统里根本没有这个目录。
进一步排查后,我发现是xdg-document-portal服务启动失败了,执行systemctl --user status xdg-document-portal.service得到的结果如下:
× xdg-document-portal.service - flatpak document portal service Loaded: loaded (/usr/lib/systemd/user/xdg-document-portal.service; static) Active: failed (Result: exit-code) since Fri 2024-01-05 18:19:54 GMT; 1s ago Process: 9581 ExecStart=/usr/libexec/xdg-document-portal (code=exited, status=1/FAILURE) Main PID: 9581 (code=exited, status=1/FAILURE) CPU: 2ms Jan 05 18:19:54 CSLLAP- systemd[4067]: Starting xdg-document-portal.service - flatpak document portal service... Jan 05 18:19:54 CSLLAP- xdg-document-portal[9581]: /usr/libexec/xdg-document-portal: /usr/local/lib/x86_64-linux-gnu/libfuse3.so.3: version `FUSE_3.12' not found (required by /usr/libexec/xdg-document-portal) Jan 05 18:19:54 CSLLAP- systemd[4067]: xdg-document-portal.service: Main process exited, code=exited, status=1/FAILURE Jan 05 18:19:54 CSLLAP- systemd[4067]: xdg-document-portal.service: Failed with result 'exit-code'. Jan 05 18:19:54 CSLLAP- systemd[4067]: Failed to start xdg-document-portal.service - flatpak document portal service.
核心错误就是这条:
Jan 05 18:19:54 CSLLAP- xdg-document-portal[9581]: /usr/libexec/xdg-document-portal: /usr/local/lib/x86_64-linux-gnu/libfuse3.so.3: version `FUSE_3.12' not found (required by /usr/libexec/xdg-document-portal)
我不太懂FUSE是什么,但我系统里明明已经装了更高版本的libfuse3:
$ sudo apt install libfuse3-dev Reading package lists... Done Building dependency tree... Done Reading state information... Done libfuse3-dev is already the newest version (3.14.0-4). 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
现在我有几个问题想请教大家:
- xdg-document-portal真的必须依赖FUSE 3.12版本吗?
- 除了手动安装FUSE 3.12之外,还有其他更稳妥的修复方法吗?
- 有没有办法让Snap应用不依赖这个服务就能正常运行?
我的系统信息:
[~]$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 23.10 Release: 23.10 Codename: mantic [~]$ uname -a Linux CSLLAP- 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 14:59:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
编辑补充:目前我找到一个临时 workaround,就是按照FUSE仓库的说明手动安装3.12版本,但我还是想搞清楚背后的原因到底是什么。
备注:内容来源于stack exchange,提问作者Nobilis
相关产品推荐
相关产品推荐

