Help us understand the problem. What is going on with this article?

ubuntuがapt-get updateに失敗するのを直したメモ

More than 3 years have passed since last update.

いつからか忘れたけど、apt-get updateが失敗するようになってた。
エラーメッセージは以下の通り。

W: http://jp.archive.ubuntu.com/ubuntu/dists/trusty/Release の取得に失敗しました  期待されるエントリ 'main/binary-C/Packages' が Release ファイル内に見つかりません (誤った sources.list エントリか、壊れたファイル)

何が原因なのかわからんけど、以下の手順で治った。

キャッシュを片っ端から消す

$ sudo rm -rf  /var/lib/apt/lists/*
$ sudo apt-get autoclean
$ sudo apt-get clean

片っ端から[arch=amd64]を足す

/etc/apt/sources.list
###### Ubuntu Main Repos
deb [arch=amd64] http://jp.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://jp.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

###### Ubuntu Update Repos
deb [arch=amd64] http://jp.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb [arch=amd64] http://jp.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb [arch=amd64] http://jp.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb [arch=amd64] http://jp.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

apt-get updateをやり直す

$ sudo apt-get update
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした