##1.実行環境
macOS Catalina10.15.6
vagrant 2.2.10
virtualbox 6.0.14
##2.問題
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] No Virtualbox Guest Additions installation found.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
Package centos-release-7-8.2003.0.el7.centos.x86_64 already installed and latest version
Nothing to do
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
No package kernel-devel-3.10.0-957.12.2.el7.x86_64 available.
Error: Nothing to do
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
yum install -y kernel-devel-`uname -r`
Stdout from the command:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tsukuba.wide.ad.jp
* extras: ftp.tsukuba.wide.ad.jp
* updates: ftp.tsukuba.wide.ad.jp
No package kernel-devel-3.10.0-957.12.2.el7.x86_64 available.
Stderr from the command:
Error: Nothing to do
問題はこれ↓
No package kernel-devel-3.10.0-957.12.2.el7.x86_64 available.
kernelの問題なのかな・・
macだから、『yum install -y kernel-devel-uname -r
』のコマンド打てないし。。
##3.試したこと
####①vagrantのバージョンを調べてみた!
$ vagrant version
Installed Version: 2.2.10
Latest Version: 2.2.10
// 最新版なので、問題なしと判断!!
####②次にvirtualboxを調べてみた!!
すると古いバージョンであることが判明!古いバージョンだったために発生したエラーでした。
バージョンを
旧:virtualbox 6.0.14
新:virtualbox 6.1.14
に更新したところ解決しました!
以上です!