Created
July 23, 2017 07:54
-
-
Save ponsuke0531/f95f44d3800ca158e0379345d462f41c to your computer and use it in GitHub Desktop.
VBoxLinuxAdditions.run を実行して unable to find the sources of your current Linux kernel になった時の対応方法 ref: http://qiita.com/ponsuke0531/items/795102fa6d65a51e32ba
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 sh /mnt/cdrom/VBoxLinuxAdditions.run | |
Verifying archive integrity... All good. | |
Uncompressing VirtualBox 5.1.22 Guest Additions for Linux........... | |
VirtualBox Guest Additions installer | |
Removing installed version 5.1.22 of VirtualBox Guest Additions... | |
Copying additional installer modules ... | |
Installing additional modules ... | |
vboxadd.sh: Starting the VirtualBox Guest Additions. | |
Failed to set up service vboxadd, please check the log file | |
/var/log/VBoxGuestAdditions.log for details. | |
$ vi /var/log/VBoxGuestAdditions.log | |
▼▼▼▼▼▼▼▼▼▼▼▼ VBoxGuestAdditions.logの中身 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ | |
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong. | |
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong. | |
vboxadd.sh: failed: modprobe vboxguest failed. | |
$ vi /var/log/vboxadd-install.log | |
▼▼▼▼▼▼▼▼▼▼▼▼ vboxadd-install.logの中身 ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ | |
/tmp/vbox.0/Makefile.include.header:112: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. 中止. | |
Creating user for the Guest Additions. | |
Creating udev rule for the Guest Additions kernel module. |
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
# CentOSのカーネルのバージョン | |
$ uname -r | |
3.10.0-514.26.2.el7.x86_64 | |
# kernel-develのカーネルのバージョン・・・ないです | |
$ ls -la /usr/src/kernels/ | |
合計 0 | |
drwxr-xr-x. 2 root root 6 11月 6 2016 . | |
drwxr-xr-x. 4 root root 58 7月 18 00:36 .. |
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 | |
読み込んだプラグイン: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 | |
No packages marked for update |
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 kernel-devel | |
読み込んだプラグイン: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 | |
依存性の解決をしています | |
--> トランザクションの確認を実行しています。 | |
---> パッケージ kernel-devel.x86_64 0:3.10.0-514.26.2.el7 を インストール | |
--> 依存性の処理をしています: perl のパッケージ: kernel-devel-3.10.0-514.26.2.el7.x86_64 | |
--> トランザクションの確認を実行しています。 | |
---> パッケージ perl.x86_64 4:5.16.3-291.el7 を インストール | |
<省略> | |
トランザクションの要約 | |
============================================================================================================================================================== | |
インストール 1 パッケージ (+27 個の依存関係のパッケージ) | |
総ダウンロード容量: 24 M | |
インストール容量: 71 M | |
Is this ok [y/d/N]: y | |
Downloading packages: | |
Delta RPMs disabled because /usr/bin/applydeltarpm not installed. | |
(1/28): perl-Carp-1.26-244.el7.noarch.rpm | 19 kB 00:00:00 | |
<省略> | |
インストール: | |
kernel-devel.x86_64 0:3.10.0-514.26.2.el7 | |
依存性関連をインストールしました: | |
perl.x86_64 4:5.16.3-291.el7 perl-Carp.noarch 0:1.26-244.el7 perl-Encode.x86_64 0:2.51-7.el7 | |
perl-Exporter.noarch 0:5.68-3.el7 perl-File-Path.noarch 0:2.09-2.el7 perl-File-Temp.noarch 0:0.23.01-3.el7 | |
perl-Filter.x86_64 0:1.49-3.el7 perl-Getopt-Long.noarch 0:2.40-2.el7 perl-HTTP-Tiny.noarch 0:0.033-3.el7 | |
perl-PathTools.x86_64 0:3.40-5.el7 perl-Pod-Escapes.noarch 1:1.04-291.el7 perl-Pod-Perldoc.noarch 0:3.20-4.el7 | |
perl-Pod-Simple.noarch 1:3.28-4.el7 perl-Pod-Usage.noarch 0:1.63-3.el7 perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 | |
perl-Socket.x86_64 0:2.010-4.el7 perl-Storable.x86_64 0:2.45-3.el7 perl-Text-ParseWords.noarch 0:3.29-4.el7 | |
perl-Time-HiRes.x86_64 4:1.9725-3.el7 perl-Time-Local.noarch 0:1.2300-2.el7 perl-constant.noarch 0:1.27-2.el7 | |
perl-libs.x86_64 4:5.16.3-291.el7 perl-macros.x86_64 4:5.16.3-291.el7 perl-parent.noarch 1:0.225-244.el7 | |
perl-podlators.noarch 0:2.5.1-3.el7 perl-threads.x86_64 0:1.87-4.el7 perl-threads-shared.x86_64 0:1.43-6.el7 | |
完了しました! |
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
$ uname -r | |
3.10.0-514.26.2.el7.x86_64 | |
$ ls -la /usr/src/kernels/ | |
合計 4 | |
drwxr-xr-x. 3 root root 40 7月 18 00:57 . | |
drwxr-xr-x. 4 root root 58 7月 18 01:34 .. | |
drwxr-xr-x. 22 root root 4096 7月 18 00:57 3.10.0-514.26.2.el7.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 sh /mnt/cdrom/VBoxLinuxAdditions.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment