我有一个Ubuntu服务器。 我正在尝试安装Vsftpd,但显示此错误:
Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package vsftpd
之后,我通过ping 4.2.2.4检查了互联网连接,工作正常。
我试图apt-get更新,但它不可能显示:
Err http://us.archive.ubuntu.com lucid Release.gpg Temporary failure resolving 'us.archive.ubuntu.com'
如果你可以ping通4.2.2.4,但不能ping us.archive.ubuntu.com它可以是一个DNS服务器的问题。 尝试ping us.archive.ubuntu.com。
以root /etc/apt/sources.list编辑/etc/apt/sources.list ,用另一个镜像replacehttp://us.archive.ubuntu.com 。 运行apt-get update来获取新镜像的包列表,然后apt-get install vsftpd 。
这听起来像你的DNS设置有问题。 看看/etc/resolv.conf。 在那里应该有一条或多条线,看起来像这样:
nameserver 8.8.8.8 nameserver 8.8.4.4
如果没有nameserver行,则添加这两个。 它们由Google提供,可以自由使用。
如果有nameserver行,testing他们正在工作。
您可以testingDNS是否使用dig工具。 使用dig us.archive.ubuntu.com来testing您的当前设置。 使用dig @8.8.8.8 us.archive.ubuntu.com来testing一个特定的名字服务器。