Yesterday I installed VirtualBox for centos6.5, but it didn't take a day. today I am idle. try centos7. as a result, PS younger brother is also a beginner of linux. many of them just found a solution, but I don't know why, don't blame O (& cap ;_& cap;) O ha! 1. install centos7, which is much simpler than the old version. 2. configure the network connection. after installing centos, use ifconfig to check whether or not
Yesterday I installed VirtualBox for centos6.5, but it didn't take a day. today I am idle. try centos7. as a result, PS younger brother is also a beginner of linux. many of them just found a solution, but I don't know why.
Strange O (∩ _ ∩) O ha!
1. install centos7, which is much simpler than the old version.
2. configure the network connection. after installing centos, use ifconfig to check that there is no IP address. solution:
Cd/etc/sysconfig/network-scripts/
Vi ifcfg-eno16777736 # note, we usually see if1__eth0, what is specific, use ifconfig to see.
ONBOOT = yes # set onboot to yes
Restart the NIC:/etc/init. d/network restart
2. install virtualbox:
1> Download the RHEL software library configuration file of VirtualBox:
[Cpp]View plaincopyprint?
- Cd/etc/yum. repos. d
- Wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
2> install RPMForge.
First
For more information, see http://wiki.centos.org/zh/additionalresources/repositories/rpmforge.
[Cpp]View plaincopyprint?
- Rpm-ivh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
3> install DKMS (Dynamic Kernel Module)
[Python]View plaincopyprint?
- Yum install dkms
4> install the development environment and kernel:
[Cpp]View plaincopyprint?
- Yum groupinstall "Development Tools"
- Yum install kernel-devel
5> install qt and qt-
[Cpp]View plaincopyprint?
- Yum install qt qt-x11
6> install VirtualBox
I downloaded it on the official website first, the version is VirtualBox-4.3-4.3.26_98988_el7-1.x86_64.rpm, https://www.virtualbox.org/wiki/Downloads
[Cpp]View plaincopyprint?
- Yum install VirtualBox-4.3-4.3.26_98988_el7-1.x86_64.rpm
7> installation extension:
[Cpp]View plaincopyprint?
- VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.16-95972.vbox-extpack
This is a problem.
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackFile, interface IExtPackFile, callee nsISupports
VBoxManage: error: Context: "Install (fReplace, NULL, ptrProgress. asOutParam ()" at line 1140 of file VBoxManageMisc. cpp
However, virtualbox already exists in the system, so you can ignore this problem and continue with the next step.
[Cpp]View plaincopyprint?
- 8>/etc/init. d/vboxdrv setup
Here an error occurs:
Building the VirtualBox Guest Additions kernel modules [FAILED]
Your system does not seem to be set up to build kernel modules.
Look at/var/log/vboxadd-install.log to find out what went wrong.
Once you have corrected it, you can run/etc/init. d/vboxadd setup to build them.
View error logs:
/Tmp/vbox. o/Makefile. include. header: 97 :***
Error: unable to find the source of your current Linux kernel. Specify KERN_DIR = And run make again. Stop.
Solution:
[Cpp]View plaincopyprint?
- Yum install kernel
- Yum install kernel-devel
- Yum install kernel-headers
- Yum install gcc *
- Yum install make
- Reboot
Restart
[Cpp]View plaincopyprint?
- /Etc/init. d/vboxdrv setup
Success!