Saturday, June 3, 2017

Cara mengatasi error apt-get update fails to fetch files, “Temporary failure resolving …"

Cara mengatasi error apt-get update fails to fetch files, “Temporary failure resolving …"

Err:1 https://deb.nodesource.com/node_6.x xenial InRelease
  Could not resolve host: deb.nodesource.com
Err:2 https://deb.opera.com/opera-developer stable InRelease                   
  Could not resolve host: deb.opera.com
Err:3 http://security.ubuntu.com/ubuntu xenial-security InRelease              
  Temporary failure resolving 'security.ubuntu.com'
Err:4 http://dl.google.com/linux/chrome/deb stable InRelease                   
  Temporary failure resolving 'dl.google.com'
Err:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease              
  Temporary failure resolving 'ppa.launchpad.net'
Err:6 http://packages.microsoft.com/repos/vscode stable InRelease              
  Temporary failure resolving 'packages.microsoft.com'
Err:7 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Hit:8 http://id.archive.ubuntu.com/ubuntu xenial InRelease
Get:9 http://id.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:10 http://id.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:11 http://id.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [544 kB]
Get:12 http://id.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [528 kB]
Get:13 http://id.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [298 kB]
Get:14 http://id.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [195 kB]
Get:15 http://id.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [471 kB]
Get:16 http://id.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [456 kB]
Get:17 http://id.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [159 kB]
Get:18 http://id.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [188 kB]
Get:19 http://id.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [2.520 B]
Get:20 http://id.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3.328 B]
Get:21 http://id.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [3.976 B]
Fetched 3.055 kB in 12s (249 kB/s)                                             
Reading package lists... Done
Building dependency tree       
Reading state information... Done
98 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease  Temporary failure resolving 'dl.google.com'
W: Failed to fetch https://deb.nodesource.com/node_6.x/dists/xenial/InRelease  Could not resolve host: deb.nodesource.com
W: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Failed to fetch https://deb.opera.com/opera-developer/dists/stable/InRelease  Could not resolve host: deb.opera.com
W: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/InRelease  Temporary failure resolving 'packages.microsoft.com'
W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Error tersebut muncul pada saat saya akan menjalankan perintah sudo apt-get update. Entah apa penyebabnya bisa tiba-tiba begitu padahal sebelumnya semua repository baik-baik saja ketika akan menjalankan perintah sudo apt-get update. Dan setelah saya telusuri ternyata...

Temporary relolving
Ada dua kemungkinan untuk masalah ini :
  • Penyedia layanan internet kamu tidak bisa memforward DNS name dengan benar ke server DNS eksternal, atau
  • Dikarenakan perubahan pada jaringan kamu juga memblokir penamaan ini - misalnya, router / modem baru, mengkonfigurasi ulang sebuah saklar dengan konfigurasi baru.
Untuk mengatasi masalah ini silahkan ikuti langkah -langkah berikut :

Pertama, coba untuk menambahkan server DNS yang dapat di kenali oleh sistem kamu, caranya, monggo jalankan peritah berikut.

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

Kemudian jalankan sudo apt-get update.

Mungkin cukup sekian untuk pembahasan kali ini, semoga bermanfaat :)

Saya hanya seorang "newbie" yang baru bisa ngoding lohor kemarin.


EmoticonEmoticon