Oracle Linux 7安装VirtualBox Extension失败问题的处理

在VirtualBox中安装Extension是一件非常简单的事,但从Oracle Linux 7开始,经常失败。
以下为安装过程以及处理方法,只解决How不解决Why:

  1. 下载Oracle Linux 7 ISO
  2. 在VirtualBox中安装,在Software Selection时选“Server With GUI”
  3. 安装完后,重启
  4. yum install gcc kernel-devel kernel-uek-devel
  5. yum -y update kernel-uek
  6. yum -y update kernel
  7. 重启,确认/lib/modules/ ( u n a m e − r ) 和 / u s r / s r c / k e r n e l s / (uname -r)和/usr/src/kernels/ (unamer)/usr/src/kernels/(uname -r)目录存在

我自己的一次处理过程,OS是OL 7U6,最小安装:

[root@mgmthost1 mnt]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.22 Guest Additions for Linux........
bzip2 not found.  Please install: bzip2 tar; and try again.

[root@mgmthost1 mnt]# yum install bzip

[root@mgmthost1 mnt]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.22 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.

This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-uek-devel kernel-uek-devel-4.14.35-1818.3.3.el7uek.x86_64
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.

This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-uek-devel kernel-uek-devel-4.14.35-1818.3.3.el7uek.x86_64

[root@mgmthost1 mnt]# yum install kernel-uek-devel kernel-uek-devel-4.14.35-1818.3.3.el7uek.x86_64
[root@mgmthost1 mnt]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.22 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 5.2.22 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
VirtualBox Guest Additions: Starting.
[root@mgmthost1 mnt]# echo $?
0

# 在VirtualBox中创建Shared Folder
[root@mgmthost1 mnt]# mount -t vboxsf downloads /mnt

成功了,看来也没那么麻烦,按照提示一步一步做就好。主要是可以上网。
由于这个OS是最小安装,所以拷贝粘贴这些就用不了了,但共享目录是我需要的。

参考:

  1. http://www.dedoimedo.com/computers/virtualbox-compilation-errors.html (OL7U3参考)
  2. Unable to install VIrtualbox, "Specify KERN_DIR=<directory>" – installing Virtual Box to Debian? - Super User (OL7U4参考)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值