安装 postfix - apt-get 的问题

安装 postfix - apt-get 的问题

我需要安装 postfix 以便从 ubuntu 终端发送自动邮件。我尝试使用以下命令:

sudo apt-get install postfix

但是我收到了以下错误:

WARNING: The following packages cannot be authenticated!
postfix
Install these packages without verification? [y/N] y

Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main postfix amd64 2.11.0-1ubuntu1   Could not resolve 'us.archive.ubuntu.com' E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/postfix/postfix_2.11.0-1ubuntu1_amd64.deb Could not resolve 'us.archive.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?

我也跑过:

sudo apt-get 更新

我得到了这个:

Err http://extras.ubuntu.com trusty InRelease    
Err http://security.ubuntu.com trusty-security InRelease
Err http://security.ubuntu.com trusty-security Release.gpg
Could not resolve 'security.ubuntu.com'
Err http://extras.ubuntu.com trusty Release.gpg
Could not resolve 'extras.ubuntu.com'
Err http://us.archive.ubuntu.com trusty InRelease
Err http://us.archive.ubuntu.com trusty-updates InRelease
Err http://us.archive.ubuntu.com trusty-backports InRelease
Err http://us.archive.ubuntu.com trusty Release.gpg
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com trusty-backports Release.gpg
Could not resolve 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/InRelease  
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease  

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease  

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'extras.ubuntu.com'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg   Could not resolve 'security.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'us.archive.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg   Could not resolve 'us.archive.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg Could not resolve 'us.archive.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.

先感谢您

PS:我的 ubuntu 版本是 14.04LTS,通过 VMware Workstation 12 Player 运行它。

答案1

看来您没有互联网连接。如果有,请尝试

ping us.archive.ubuntu.com

如果不起作用,请尝试

host -v us.archive.ubuntu.com

如果您的 DNS 连接出现任何错误,它们将显示在这里。

相关内容