1

Am getting an error while installing OpenSSH :

Err:2 http://security.ubuntu.com/ubuntu xenial-security/main i386
openssh-server i386 1:7.2p2-4ubuntu2.7   Could not resolve
'security.ubuntu.com' E: Failed to fetch
http://security.ubuntu.com/ubuntu/pool/main/o/openssh/openssh-sftp-server_7.2p2-4ubuntu2.7_i386.deb
Could not resolve 'security.ubuntu.com'

E: Failed to fetch
http://security.ubuntu.com/ubuntu/pool/main/o/openssh/openssh-server_7.2p2-4ubuntu2.7_i386.deb
Could not resolve 'security.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?
Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
GG_LX
  • 11
  • 1

1 Answers1

2

I believe you can't reach your DNS server, which leads to not being able to resolve the hostname of "security.ubuntu.com"

If you do know your DNS ip you can edit /etc/resolv.conf and set the DNS ip on the variable nameserver

Edit for a correct DNS: e.g.

nameserver 8.8.8.8

If it doesn't work again, reboot and then it should be good.