Cetos7をVirtualBox上で動かして
yum update
yum install xxx
を試してみたところ
下記エラーが出力され、実行できません。
読み込んだプラグイン:fastestmirror base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') 他のミラーを試します。 http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') 他のミラーを試します。 http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') 他のミラーを試します。 ・ ・ ・ 他のミラーを試します。 http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') 他のミラーを試します。 One of the configured repositories failed (CentOS-7 - Updates), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=updates ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable updates or subscription-manager repos --disable=updates 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=updates.skip_if_unavailable=true failure: repodata/repomd.xml from updates: [Errno 256] No more mirrors to try. http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') ・ ・ ・ ・ http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
[やってみたこと]
・DNSの設定 → 8.8.8.8
・デフォルトゲートウェイの設定
・CentOS-Base.repoを下記のようにbaseurlを変更後 yum clean all
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ baseurl=http://ftp.riken.jp/Linux/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ baseurl=http://ftp.riken.jp/Linux/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ baseurl=http://ftp.riken.jp/Linux/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ baseurl=http://ftp.riken.jp/Linux/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
pingによるインターネットへの疎通は正常に行えます。
ping google.com PING google.com (216.58.199.238) 56(84) bytes of data. 64 bytes from kix05s02-in-f238.1e100.net (216.58.199.238): icmp_seq=1 ttl=54 time=8.46 ms 64 bytes from kix05s02-in-f238.1e100.net (216.58.199.238): icmp_seq=2 ttl=54 time=10.7 ms 64 bytes from kix05s02-in-f238.1e100.net (216.58.199.238): icmp_seq=3 ttl=54 time=4.84 ms ping yahoo.com PING yahoo.com (72.30.35.10) 56(84) bytes of data. 64 bytes from media-router-fp2.prod1.media.vip.bf1.yahoo.com (72.30.35.10): icmp_seq=1 ttl=44 time=189 ms 64 bytes from media-router-fp2.prod1.media.vip.bf1.yahoo.com (72.30.35.10): icmp_seq=2 ttl=44 time=187 ms 64 bytes from media-router-fp2.prod1.media.vip.bf1.yahoo.com (72.30.35.10): icmp_seq=3 ttl=44 time=187 ms
[環境]
・ホストOS Windows Server 2012 R2 Standard
・VirtualBox 5.2.8 [ブリッジ接続]
・ゲストOS CentOS Linux release 7.4.1708 (Core)
ご教示のほど宜しくお願い致します。
proxyを経由しているとかないですか?
すいません。言葉足りないと感じたので・・・ proxy経由制限がかかった環境ではありませんか?
proxy経由制限はしていないですね。。
$curl http://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xml curl: (52) Empty reply from server
ちなみにいろいろ探ったところ curl http://ftp.riken.jp/Linux/ は正しく取得でき、curl http://ftp.riken.jp/Linux/centos/はエラーとなりました。不思議です。。。
そもそも、ミラーサイトが参照できていないですね...何故だろう?ホストosのブラウザから該当urlには接続できますか?
ホストOSのブラウザからは参照可能でした。そしてcurl ftp://ftp.riken.jp/Linux/centos/7/updates/x86_64/repodata/repomd.xmlは通ったので、baseurlをftp://ftp.riken.jp/Linux/・・・・・・にすることによって問題解決(yum update成功)しました。。。何故!?
もうちょっと噛み砕いた説明が欲しいところです。自己解決で回答していただけると助かります。
回答3件
あなたの回答
tips
プレビュー