Fix “W: Some index files failed to download.” Error In Ubuntu Linux

コード
コード

 


Fix “W: Some index files failed to download.” Error In Ubuntu Linux - Untuk materi kali ini admin akan membahas penyebab linux yang tidak dapat melakukan update. Ketika admin melakukan perintah update, maka hasilnya akan seperti di bawah ini

Err:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
  Could not connect to in.archive.ubuntu.com:80 (2403:8940:ffff::f), connection timed out Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out
Err:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
  Unable to connect to in.archive.ubuntu.com:http:
Err:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
  Unable to connect to in.archive.ubuntu.com:http:
Err:4 http://in.archive.ubuntu.com/ubuntu focal-security InRelease
  Unable to connect to in.archive.ubuntu.com:http:
Reading package lists... Done                           
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Could not connect to in.archive.ubuntu.com:80 (2403:8940:ffff::f), connection timed out Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Unable to connect to in.archive.ubuntu.com:http:
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Unable to connect to in.archive.ubuntu.com:http:
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  Unable to connect to in.archive.ubuntu.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.

Nah untuk mengatasi error tersebut, kamu dapat mengikuti langkah-langkah seperti di bawah ini, namun sebelumnya lakukan lah pencadangan terlebih dahulu
$ sudo mv /etc/apt/sources.list{,.backup}
$ sudo mv /etc/apt/sources.list.d{,.backup}
Selanjutlah lihat apakah daftar sumber dari file /usr/share/doc/apt/examples/sources.list 
# See sources.list(5) manpage for more information
# Remember that CD-ROMs, DVDs and such are managed through the apt-cdrom tool.
deb http://us.archive.ubuntu.com/ubuntu focal main restricted
deb-src http://us.archive.ubuntu.com/ubuntu focal main restricted

deb http://security.ubuntu.com/ubuntu focal-security main restricted
deb-src http://security.ubuntu.com/ubuntu focal-security main restricted

deb http://us.archive.ubuntu.com/ubuntu focal-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu focal-updates main restricted
Kemudian buat daftar sumber baru dengan menggunakan perintah berikut 
$ sudo mkdir /etc/apt/sources.list.d
$ sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
$ sudo apt update

Cara selanjutnya ialah menonaktifkan repository sumber dengan menambahkan has (#)
#deb-src http://us.archive.ubuntu.com/ubuntu focal-updates main restricted
[...]
Kemudian perbaharui update linuxnya. 

Comments : Fix “W: Some index files failed to download.” Error In Ubuntu Linux