LoginSignup
10
6

More than 5 years have passed since last update.

LPIC対策にVirtual Box上のCentOS7にGuest Additonsを入れる際にハマった

Last updated at Posted at 2016-11-19

対象

・LPICレベル1合格を目指す人
・エンジニア初級者
・CentOSにGuest Additonsが入れられなくて困っている人

内容

仮想端末に入るのにいちいちCaptureされるのが面倒なのでGuest Additonsを入れようとしてハマったので解決方法の備忘録

・Guest Additionsを入れようとした時に引っかかったところ

Vboxadd.sh: Building Guest Additons kernel module
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details. 

・VBoxGuestAdditions.logで詳細確認してくれと言われたのでcatコマンドで開いてみる

cat /var/log/VBoxGuestAdditions.log
以下中身
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..

・vboxadd-install.logを見てくれとたらい回しにされるw

cat /var/log/vboxadd-install.log
以下中身
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

解決方法

ネットで色々調べてなんとか解決しました。

yum -y install update kernel
yum -y install kernel-devel kernel-headers gcc gcc-c++

終了後の再起動を忘れずに!!!!
再起動後、Guest Additonsを実行すれば無事インストールできました。

10
6
1

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
10
6