15
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

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

Last updated at Posted at 2017-05-13

いつからか忘れたけど、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
15
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?