LoginSignup
0
6

More than 5 years have passed since last update.

Vagrantのyumでハマった。

Posted at

Windows環境でVagrantをイントールして動かしたところ、
yumができませんでした。

インストールからcentosへのログインまでは、
この記事を参照されせていただきました。
Windows上でVirtualBox+Vagrant+CentOSによる仮想環境構築

それでyumインストールしたところこんなエラーが。。

[root@localhost ~]# yum -y install httpd
Geladene Plugins: fastestmirror
base                                                                         | 3.6 kB  00:00:00
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
14: curl#52 - "Empty reply from server"

どうやらyumのリポジトリに記載されているURLがダメらしい。

/etc/yum.repos.d/CentOS-Base.repo の mirrorlistがダメらしい。
そこでmirrorlistをコメントアウトして、
baseurlのコメントアウトを外したらyumが実行できた。

Befor
[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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
After
[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/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
0
6
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
0
6