输入命令后sudo apt update
我得到回复:
Err:1 http://pl.archive.ubuntu.com/ubuntu bionic InRelease
Temporary failure resolving 'pl.archive.ubuntu.com'
Err:2 http://pl.archive.ubuntu.com/ubuntu bionic-updates InRelease
Temporary failure resolving 'pl.archive.ubuntu.com'
Err:3 http://pl.archive.ubuntu.com/ubuntu bionic-backports InRelease
Temporary failure resolving 'pl.archive.ubuntu.com'
Err:4 http://pl.archive.ubuntu.com/ubuntu bionic-security InRelease
Temporary failure resolving 'pl.archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://pl.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Temporary failure resolving 'pl.archive.ubuntu.com'
W: Failed to fetch http://pl.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Temporary failure resolving 'pl.archive.ubuntu.com'
W: Failed to fetch http://pl.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Temporary failure resolving 'pl.archive.ubuntu.com'
W: Failed to fetch http://pl.archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease Temporary failure resolving 'pl.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
输入命令后sudo apt install snmp snmp-mibs-downloader
我得到回复:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package snmp-mibs-downloader is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'snmp-mibs-downloader' has no installation candidate
这些错误是什么?我该如何修复它们?
答案1
波兰的存储库现在似乎已关闭。暂时无法解析“pl.archive.ubuntu.com”这是错误,这意味着该网站目前因某种原因已关闭。尝试其他网站或稍后重试。您可以编辑源列表或等待一小时后重试。
源列表 /etc/apt/sources.list 和 /etc/apt/sources.list.d/ 中包含的文件旨在支持任意数量的活动源和各种源媒体。
例如,您可以通过将 pl 更改为 uk 来尝试英国或美国网站。
答案2
使用此命令可以修复该问题:
sudo dhclient eth0
eth0- 网络接口的名称