卸载 snapd 后 WSL 损坏

卸载 snapd 后 WSL 损坏

当我输入:

sudo apt install zsh
>Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apparmor file liblzo2-2 libmagic-mgc libmagic1 libmpdec2 libpython3-stdlib libpython3.7-minimal libpython3.7-stdlib mime-support python3 python3-minimal python3.7
  python3.7-minimal squashfs-tools
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  zsh-common
Suggested packages:
  zsh-doc

E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success

E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success

每次我想安装软件包时都会失败,所以我陷入困境。也许我应该重新安装所有内容。

我已经卸载了snapd,但问题仍然存在。我正在使用 Debian 应用程序。

答案1

您可以像这样手动删除错误的 apt 钩子:

sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf

(请先备份。)

来源

相关内容