6
7

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.

dockerでCentOS6を使うときにyum update が遅かった

Posted at

docker でcentos6 を使ってyum update したら異様に遅かったので、

# docker run -t -i centos:centos6 /bin/bash
bash-4.1# 
bash-4.1# yum update
Loaded plugins: fastestmirror                                                                                                               
base                                                                                                                                        | 3.7 kB     00:00
base/primary_db                                                                                                                             | 4.4 MB     00:00
extras                                                                                                                                      | 3.3 kB     00:00
extras/primary_db                                                                                                                           |  19 kB     00:00
libselinux                                                                                                                                  | 3.4 kB     00:00
libselinux/primary_db                                                                                                                       | 2.7 MB     00:00
updates                                                                                                                                     | 3.4 kB     00:00
updates/primary_db                                                 13% [=======                                                  ] 5.8 kB/s | 708 kB     13:29 ETA  

5.8kB/sなり。 遅すぎなのでCTL-cしたら

 Current download cancelled, interrupt (ctrl-c) again within two seconds
to exit.  

http://mirrors.yun-idc.com/centos/6.5/updates/x86_64/repodata/da7d5b44fca19c924b160677a95fc8ef5cce450991c1a37a5cbbf513e36f310a-primary.sqlite.bz2: [Errno 14] PYC
URL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://centos.mirror.cdnetworks.com/6.5/updates/x86_64/repodata/da7d5b44fca19c924b160677a95fc8ef5cce450991c1a37a5cbbf513e36f310a-primary.sqlite.bz2: [Errno 14] PYC
URL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
^C

Exiting on user cancel
bash-4.1# 

cache がおかしいらしいのでクリアしたら

bash-4.1# find / | grep primary.sqlite.bz2
/var/cache/yum/x86_64/6/updates/da7d5b44fca19c924b160677a95fc8ef5cce450991c1a37a5cbbf513e36f310a-primary.sqlite.bz2
bash-4.1# 
bash-4.1# 
bash-4.1# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras libselinux updates
Cleaning up Everything
bash-4.1# 

スムーズになったよ

bash-4.1# yum update
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * libselinux: www.ftp.ne.jp
 * updates: ftp.yzu.edu.tw
base                                                                                                                                        | 3.7 kB     00:00
base/primary_db                                                                                                                             | 4.4 MB     00:00
extras                                                                                                                                      | 3.3 kB     00:00
extras/primary_db                                                                                                                           |  19 kB     00:00
libselinux                                                                                                                                  | 3.4 kB     00:00
libselinux/primary_db                                                                                                                       | 2.7 MB     00:00
updates                                                                                                                                     | 3.4 kB     00:00
updates/primary_db                                                                                                                          | 5.3 MB     00:07
Setting up Update Process
Resolving Dependencies
6
7
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
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?