首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用apt或apt-get时的错误消息

使用apt或apt-get时的错误消息
EN

Ask Ubuntu用户
提问于 2020-12-11 11:40:58
回答 1查看 198关注 0票数 0

我在WSL上使用的是ubuntu 18。

例如,使用apt,我得到了错误消息sudo apt autoremove

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dns-root-data dnsmasq-base ebtables libdumbnet1 libllvm9 liblxc-common liblxc1 libyaml-0-2 linux-headers-4.15.0-88
  linux-headers-4.15.0-88-generic lxcfs squashfs-tools uidmap xdelta3
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  python-doc python-tk
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

例如,使用sudo apt install python也是一样的:

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dns-root-data dnsmasq-base ebtables libdumbnet1 libllvm9 liblxc-common liblxc1 libyaml-0-2 linux-headers-4.15.0-88
  linux-headers-4.15.0-88-generic lxcfs squashfs-tools uidmap xdelta3
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  python-doc python-tk
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

我该怎么办?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2020-12-11 11:47:51

对于有时过于方便的快速和肮脏的解决方案,请重命名一个文件:

代码语言:javascript
复制
sudo mv /etc/apt/apt.conf.d/20snapd.conf /etc/apt/apt.conf.d/20snapd.old

然后,您可以使用apt做任何您需要的事情,然后将文件重命名为原来的名称。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1299268

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档