Created
July 17, 2017 14:28
-
-
Save ponsuke0531/3e0b563db12f04ba55226a63c2d22caa to your computer and use it in GitHub Desktop.
VirtualBoxのCentOS7で yum install したら Could not retrieve mirrorlist となった時の対応方法 ref: http://qiita.com/ponsuke0531/items/e036dfa4dd1e69086e13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum install bzip2 | |
[sudo] password for mana: | |
読み込んだプラグイン:fastestmirror | |
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was | |
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 不明なエラー" | |
One of the configured repositories failed (不明), | |
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=<repoid> ... | |
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 <repoid> | |
or | |
subscription-manager repos --disable=<repoid> | |
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=<repoid>.skip_if_unavailable=true | |
Cannot find a valid baseurl for repo: base/7/x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum update | |
[sudo] password for mana: | |
読み込んだプラグイン:fastestmirror | |
base | 3.6 kB 00:00:00 | |
extras | 3.4 kB 00:00:00 | |
updates | 3.4 kB 00:00:00 | |
(1/4): extras/7/x86_64/primary_db | 190 kB 00:00:00 | |
(2/4): base/7/x86_64/group_gz | 155 kB 00:00:01 | |
(3/4): base/7/x86_64/primary_db | 5.6 MB 00:00:01 | |
(4/4): updates/7/x86_64/primary_db | 7.7 MB 00:00:03 | |
Determining fastest mirrors | |
* base: ftp.nara.wide.ad.jp | |
<省略> | |
$ yum --version | |
3.4.3 | |
インストール: rpm-4.11.3-21.el7.x86_64 (日時: 2017-05-29 12:57) | |
構築 : CentOS BuildSystem <http://bugs.centos.org> (日時: 2016-11-05 23:37) | |
コミット : Florian Festi <ffesti@redhat.com> (日時: 2016-07-26) | |
<省略> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum install bzip2 | |
読み込んだプラグイン:fastestmirror | |
Loading mirror speeds from cached hostfile | |
* base: ftp.nara.wide.ad.jp | |
* extras: ftp.tsukuba.wide.ad.jp | |
* updates: ftp.tsukuba.wide.ad.jp | |
依存性の解決をしています | |
--> トランザクションの確認を実行しています。 | |
---> パッケージ bzip2.x86_64 0:1.0.6-13.el7 を インストール | |
--> 依存性解決を終了しました。 | |
依存性を解決しました | |
============================================================================================================================================================== | |
Package アーキテクチャー バージョン リポジトリー 容量 | |
============================================================================================================================================================== | |
インストール中: | |
bzip2 x86_64 1.0.6-13.el7 base 52 k | |
トランザクションの要約 | |
============================================================================================================================================================== | |
インストール 1 パッケージ | |
総ダウンロード容量: 52 k | |
インストール容量: 82 k | |
Is this ok [y/d/N]: y | |
Downloading packages: | |
bzip2-1.0.6-13.el7.x86_64.rpm | 52 kB 00:00:00 | |
Running transaction check | |
Running transaction test | |
Transaction test succeeded | |
Running transaction | |
インストール中 : bzip2-1.0.6-13.el7.x86_64 1/1 | |
検証中 : bzip2-1.0.6-13.el7.x86_64 1/1 | |
インストール: | |
bzip2.x86_64 0:1.0.6-13.el7 | |
完了しました! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment