我最近在 Windows 10 上安装了 Ubuntu 18.04,但每次尝试安装任何东西时都会收到这些消息。
~$ sudo snap install canonical-livepatch
[sudo] password for john:
error: cannot install "canonical-livepatch": Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io: no such host
~$ sudo apt install ubuntu-restricted-extras
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ubuntu-restricted-extras
答案1
听起来也许你的存储库已经过时或者损坏了。
尝试 sudo su root apt update
apt full-upgrade -y
如果失败了(如果您的存储库混乱了就会失败。)
尝试这个
apt-get check && apt-get update
apt-upgrade
请注意,您可能需要运行几次更新。