3
1

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 1 year has passed since last update.

【CentOS7】yumのupdateでエラー

Posted at

アバン

Centos チョット ワカルカモしてたら詰まりました。

yum update

で、下記のエラー


Repository packages-microsoft-com-prod is listed more than once in the configuration
https://apt-mo.trafficmanager.net/yumr/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
他のミラーを試します。
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.



 One of the configured repositories failed (added from: https://apt-mo.trafficmanager.net/yumr),
 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=apt-mo.trafficmanager.net_yumr ...

     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 apt-mo.trafficmanager.net_yumr
        or
            subscription-manager repos --disable=apt-mo.trafficmanager.net_yumr

     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=apt-mo.trafficmanager.net_yumr.skip_if_unavailable=true

failure: repodata/repomd.xml from apt-mo.trafficmanager.net_yumr: [Errno 256] No more mirrors to try.
https://apt-mo.trafficmanager.net/yumr/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

先に結論

ここをちゃんと読みます。

failure: repodata/repomd.xml from apt-mo.trafficmanager.net_yumr: [Errno 256] No more mirrors to try.
https://apt-mo.trafficmanager.net/yumr/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

etc/yum.repos.dの中にあるapt-mo.trafficmanager.net_yumrから試行するミラーサイトはもうないですよ~
ここのURL見たけど404ですよ~……ということらしい。
ので、etc/yum.repos.dにあるapt-mo.trafficmanager.net_yumrを削除!!!

rm apt-mo.trafficmanager.net_yumr

これで再度updateかけたら動きました。
何時間悩んでたのさ……。

余談

https://apt-mo.trafficmanager.net/yumr/repodata/repomd.xml 、というものを見ているらしいけどどこから参照しているのかわからない……。
(てか404だしなんだこれ)
repodata/repomd.xml ってどこのファイルのこと……?

と路頭に迷って色々試しました。
試した結果、該当のリポジトリ削除したらそのお試し部分がエラー吐いたので元に戻しました。

↓こういう、ミラーサイト見ないように設定した奴なんですけども。
https://studyinfra.net/linux/centos6-yum-error/
2024年まではcentos7は大丈夫なので、その後からが本番ですね。
げろげろげろ。

リポジトリの意味とかぜんぜんわかってないと苦労しますね。
たまにしか触らないのもあるのでしょうけど、似たような人が現れたときのために記録を残します。

3
1
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
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?