Snap 无法刷新 Firefox

Snap 无法刷新 Firefox

我收到一个弹出窗口,上面写着“Firefox 有更新。请确保它未在运行”。因此,我确保 Firefox 未在运行,然后执行以下操作:

Wizard Earth:snap refresh firefox
error: cannot perform the following tasks:
- Run configure hook of "firefox" snap if present (run hook "configure": /snap/firefox/1993/snap/command-chain/hooks-configure-desktop: line 34: cannot create temp file for here-document: No such file or directory)
Wizard Earth:

因此我开始探索:

Wizard Earth:ll /snap/firefox/
total 8
drwxr-xr-x  3 root root 4096 Oct 24 06:21 ./
drwxr-xr-x 21 root root 4096 Oct 14 11:16 ../
drwxr-xr-x  7 root root  201 Oct  7 13:20 1943/
lrwxrwxrwx  1 root root    4 Oct 24 06:21 current -> 1943/
Wizard Earth:

好的,所以没有 1993,但是 1943 下有一个 hooks-configure-desktop!

Wizard Earth:ls /snap/firefox/1943/snap/command-chain/hooks-configure-desktop 
/snap/firefox/1943/snap/command-chain/hooks-configure-desktop*
Wizard Earth:/snap/firefox/1943/snap/command-chain/hooks-configure-desktop
/usr/share/fonts: caching, new cache contents: 0 fonts, 6 dirs
/usr/share/fonts/X11: caching, new cache contents: 0 fonts, 6 dirs
/usr/share/fonts/X11/100dpi: caching, new cache contents: 358 fonts, 0 dirs
/usr/share/fonts/X11/75dpi: caching, new cache contents: 358 fonts, 0 dirs
/usr/share/fonts/X11/Type1: caching, new cache contents: 127 fonts, 0 dirs
/usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
/usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/X11/misc: caching, new cache contents: 90 fonts, 0 dirs
/usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs
...
/usr/share/fonts/truetype/roboto/unhinted: skipping, looped directory detected
/usr/share/fonts/truetype/roboto/unhinted/RobotoTTF: skipping, looped directory detected
/fontconfig: cleaning cache directory
/var/cache/fontconfig: cleaning cache directory
/usr/bin/fc-cache: succeeded
Wizard Earth:

它可以运行,但问题仍然存在。

由于该脚本存在于 1943 年,而没有 1993 年,我想我会尝试对其进行符号链接:

Wizard Earth:ln -s 1943 1993
Wizard Earth:snap refresh firefox
error: cannot perform the following tasks:
- Mount snap "firefox" (1993) (systemctl command [start snap-firefox-1993.mount] failed with exit status 1: Job failed. See "journalctl -xe" for details.
)
Wizard Earth:ll
total 8
drwxr-xr-x  3 root root 4096 Oct 24 06:34 ./
drwxr-xr-x 21 root root 4096 Oct 14 11:16 ../
drwxr-xr-x  7 root root  201 Oct  7 13:20 1943/
lrwxrwxrwx  1 root root    4 Oct 24 06:28 current -> 1943/
Wizard Earth:

因此它无法启动 snap-firefox-1993.mount,因为在某个过程中它删除了 1993!Firefox 是否需要挂载?

然后我想,“我想知道如果我把 1943 -> 1993 放进去会发生什么”。这就是事情变得奇怪的地方:

Wizard Earth:mv 1943 1993
mv: cannot move '1943' to '1993': Device or resource busy
Wizard Earth:lsof 1943
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
      Output information may be incomplete.
Wizard Earth:

也许是抄袭?

Wizard Earth:cp -rp 1943 1993
Wizard Earth:snap refresh firefox
error: cannot perform the following tasks:
- Run configure hook of "firefox" snap if present (run hook "configure": /snap/firefox/1993/snap/command-chain/hooks-configure-desktop: line 34: cannot create temp file for here-document: No such file or directory)
Wizard Earth:ls
1943/  current@
Wizard Earth:

好的,删除并重新安装怎么样?

Wizard Earth:snap remove firefox
error: cannot perform the following tasks:
- Disconnect firefox:x11 from snapd:x11 (cannot update mount namespace of snap "firefox": cannot update preserved namespace of snap "firefox": 
-----
update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1535/share/themes/Adwaita-dark /snap/firefox/1943/data-dir/themes/Adwaita-dark none bind,ro 0 0): cannot create writable mimic over "/snap/firefox/1943/data-dir/themes": cannot create directory "/tmp/.snap": no such file or directory
update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1535/share/themes/Adwaita /snap/firefox/1943/data-dir/themes/Adwaita none bind,ro 0 0): cannot create writable mimic over "/snap/firefox/1943/data-dir/themes": cannot create directory "/tmp/.snap": no such file or directory
update.go:85: cannot change mount namespace according to change mount (/snap/gtk-common-themes/1535/share/themes/Ambiance /snap/firefox/1943/data-dir/themes/Ambiance none bind,ro 0 0): cannot create writable mimic over "/snap/firefox/1943/data-dir/themes": cannot create directory "/tmp/.snap": no such file or directory
...
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/tmp/.X11-unix /tmp/.X11-unix none bind,ro 0 0): cannot create directory "/tmp/.X11-unix": no such file or directory
cannot update snap namespace: cannot create writable mimic over "/usr/share": cannot create directory "/tmp/.snap": no such file or directory
-----)

嗯嗯...删除了吗?

Earth:firefox
update.go:85: cannot change mount namespace according to change mount (/run/user/1000/doc/by-app/snap.firefox /run/user/1000/doc none bind,rw,x-snapd.ignore-missing 0 0): permission denied
/snap/firefox/1943/snap/command-chain/desktop-launch: line 52: /home/andrew/.config/user-dirs.dirs: Permission denied
ERROR: not connected to the gnome-3-38-2004 content interface.
Earth:ll .config/user-dirs.dirs 
-rw-r--r-- 1 andrew defaria 725 Mar  1  2022 .config/user-dirs.dirs
Earth:

太棒了!现在我再也无法运行 Firefox 了!也许可以重新安装?

Wizard Earth:snap refresh firefox
error: cannot perform the following tasks:
- Setup snap "firefox" (1993) security profiles (cannot update mount namespace of snap "firefox": cannot update preserved namespace of snap "firefox": cannot update snap namespace: cannot create writable mimic over "/snap/firefox/1993/gnome-platform": cannot create directory "/tmp/.snap": no such file or directory)
Wizard Earth:mkdir /tmp/.snap
Wizard Earth:snap refresh firefox
error: cannot perform the following tasks:
- Setup snap "firefox" (1993) security profiles (cannot update mount namespace of snap "firefox": cannot update preserved namespace of snap "firefox": cannot update snap namespace: cannot create writable mimic over "/snap/firefox/1993/gnome-platform": cannot create directory "/tmp/.snap": no such file or directory)
Wizard Earth:

相关内容