LoginSignup
12
13

More than 3 years have passed since last update.

apt-get updateでタイムアウトしてくれるときの設定

Last updated at Posted at 2014-05-24

apt-getやaptitudeで以下のように出力されて、パッケージリストの更新が上手く行かないときの設定。

Err http://security.ubuntu.com trusty-security InRelease
Err http://security.ubuntu.com trusty-security Release.gpg
'security.ubuntu.com' を解決できませんでした

そもそもが…apt-getとかaptitudeって、複数のリポジトリに並列アクセスしているみたいなんだけど、
これやると、ネットワーク負荷が高くてタイムアウトしているように見える。
そこで、各リポジトリへのアクセスを直列化してしまうことで、全体の時間はかかるが、パッケージリストの更新に失敗することはなくなる(当然ながら、根本的にネットワークがダメだったり、リポジトリ側が落ちていたりするのは別)

http://askubuntu.com/questions/88731/can-the-update-manager-download-only-a-single-package-at-a-time
を参考に
/etc/apt/apt.conf.d/75download

/etc/apt/apt.conf.d/75download
Acquire::Queue-Mode "access";
Acquire::http::Dl-Limit "70";

とすることで解決した。
他にも設定を入れてあげたら、結構よくなりそうな気がする。

12
13
1

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
12
13