2021/개발

Ubuntu apt-get update 실패

mjin.park 2021. 1. 3. 18:09

우분투에서 apt-get update를 진행하려고 하니 계속 아래의 에러 메세지가 출력되었다.

 

Err:1 http://ports.ubuntu.com xenial InRelease
  Temporary failure resolving 'ports.ubuntu.com'

Err:2 http://ppa.launchpad.net/flexiondotorg/minecraft/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'

Err:3 http://ppa.launchpad.net/ubuntu-mate-dev/welcome/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'

Err:4 http://ppa.launchpad.net/ubuntu-mate-dev/xenial-mate/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'

Err:5 http://ppa.launchpad.net/ubuntu-pi-flavour-makers/ppa/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'

Err:6 http://ports.ubuntu.com xenial-updates InRelease
  Temporary failure resolving 'ports.ubuntu.com'

Err:7 http://ports.ubuntu.com xenial-security InRelease
  Temporary failure resolving 'ports.ubuntu.com'

Err:8 http://ports.ubuntu.com xenial-backports InRelease
  Temporary failure resolving 'ports.ubuntu.com'

Err:9 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
  Temporary failure resolving 'ports.ubuntu.com'

 


위 메세지가 출력되는 경우, 일단 인터넷이 연결되어있는지 확인한다.

다른 건 다 잘 된다면 DNS가 문제일 확률이 높다.

 

아래 두 파일을 수정한다.

  • '/etc/network/interfaces' 파일에 'dns-nameservers 8.8.8.8 8.8.4.4' 추가

  • '/etc/resolv.conf' 파일에 'nameserver 8.8.8.8'와 'nameserver 8.8.4.4' 두 줄 추가

다시 sudo apt-get update를 진행하면 정상적으로 업데이트가 진행된다.

 

참고: http://notpeelbean.tistory.com/entry/linux-Ubuntu-업데이트-서버-연결-에러-aptget-update-에러

 

 

반응형