snapd 错误:soket 权限被拒绝

snapd 错误:soket 权限被拒绝

重启我的 Ubuntu (22.04) 机器(进行了一些更新后)后,我无法打开 Firefox、Slack……以及我通过 snap 安装的大多数应用程序。经过 2 小时的调试,我选择了极端的解决方案,删除 snap 和 snapd,然后从头开始重新安装它们: sudo apt autoremove --purge snapd && sudo apt autoremove --purge snap 然后: sudo apt install snapd

然后我安装了 snap-store: snap install snap-store 当我在命令行中输入时snap store,出现错误:

error: cannot communicate with server: Post "http://localhost/v2/snapctl": dial unix /run/snapd-snap.socket: socket: permission denied
ERROR: not connected to the gnome-42-2204 content interface.

然后我尝试sudo systemctl restart snapd.service并验证 snapd 是否处于活动状态: systemctl status snapd.service 输出:

     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-01-31 14:00:08 CET; 28min ago
TriggeredBy: ● snapd.socket
   Main PID: 15360 (snapd)
      Tasks: 26 (limit: 38050)
     Memory: 759.4M
        CPU: 12.844s
     CGroup: /system.slice/snapd.service
             └─15360 /usr/lib/snapd/snapd

Jan 31 14:07:34 discipulus-ridens snapd[15360]: + [ -z  ]
Jan 31 14:07:34 discipulus-ridens snapd[15360]: + value=false
Jan 31 14:07:34 discipulus-ridens snapd[15360]: + echo false
Jan 31 14:07:34 discipulus-ridens snapd[15360]: + debug_enable=false
Jan 31 14:07:34 discipulus-ridens snapd[15360]: + get_property connectivity.uri
Jan 31 14:07:34 discipulus-ridens snapd[15360]: + snapctl get connectivity.uri
Jan 31 14:07:34 discipulus-ridens snapd[15360]: error: cannot communicate with server: Post "http://localhost/v2/snapctl": dial unix /run/snapd-snap.socket: socket: permission denied
Jan 31 14:07:34 discipulus-ridens snapd[15360]: + connectivity_uri=
Jan 31 14:07:34 discipulus-ridens snapd[15360]: -----
Jan 31 14:07:34 discipulus-ridens snapd[15360]: services.go:1103: RemoveSnapServices - disabling snap.network-manager.networkmanager.service

为了完整起见,这些是 snap-store 的连接:

Interface                 Plug                                      Slot                            Notes
appstream-metadata        snap-store:appstream-metadata             :appstream-metadata             
content[gnome-42-2204]    snap-store:gnome-42-2204                  gnome-42-2204:gnome-42-2204     
content[gtk-3-themes]     snap-store:gtk-3-themes                   gtk-common-themes:gtk-3-themes  
content[icon-themes]      snap-store:icon-themes                    gtk-common-themes:icon-themes   
content[sound-themes]     snap-store:sound-themes                   gtk-common-themes:sound-themes  
dbus                      -                                         snap-store:packagekit-svc       
dbus                      -                                         snap-store:snap-store           
desktop                   snap-store:desktop                        :desktop                        
desktop-legacy            snap-store:desktop-legacy                 :desktop-legacy                 
fwupd                     snap-store:fwupd                          :fwupd                          
gsettings                 snap-store:gsettings                      :gsettings                      
network                   snap-store:network                        :network                        
network-manager           snap-store:network-manager                -                               
network-status            snap-store:network-status                 :network-status                 
opengl                    snap-store:opengl                         :opengl                         
packagekit-control        snap-store:packagekit-control             :packagekit-control             
password-manager-service  snap-store:password-manager-service       :password-manager-service       
personal-files            snap-store:dot-snap-auth-json             -                               
snapd-control             snap-store:snapd-control                  :snapd-control                  
system-files              snap-store:hostfs-usr-share-applications  :system-files                   
system-observe            snap-store:system-observe                 :system-observe                 
upower-observe            snap-store:upower-observe                 :upower-observe                 
wayland                   snap-store:wayland                        :wayland                        
x11                       snap-store:x11                            :x11                            

我也遇到了 Chromium 的 snap-store 错误。我认为网络连接存在一些问题,但我真的不知道该怎么解决。任何见解都非常感谢。

相关内容