Cannot install GuestAdditions for Virtual Box running Centros 7
I am very new to Linux. I am using the VirtualBox 5.2.8 platform to run Centros 7 Desktop. After loading the software, I found that the VirtualBox screen only took up a small part of the monitor. I understand that if I want to increase the size of the screen, I need to install Guest Additions.
But when I try to install Guest Additions, I get the following error message. Incompressing VirtualBox 5.2.8 Guest Additions for Linux........ VirtualBox Guest Additions installer Removing installed version 5.2.8 of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. 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-devel kernel-devel-3.10.0-693.17.1.el7.x86_64 VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. 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-devel kernel-devel-3.10.0-693.17.1.el7.x86_64 Press Return to close this window... I've tried to install the headers in various ways and ended up with a black screen - probably because I am not installing the correct packages. |
The problem is described here:
Quote:
Completely update the system using yum. If you see a new kernel package get installed, reboot the system to start using the new kernel. Code:
yum update -y Code:
yum install -y gcc make perl kernel-devel |
Bradj47, Thank you for your help. I tried the installs that you had suggested. I had already updated the system, so "yum update -y" did not identify any packages that needed to be installed. The other line you suggested "yum install -y gcc make perl kernel-devel" installed one package. But after rebooting, I ended up with a black screen where I could not see or click on my log in screen. i did notice that the mouse capture now allowed me to move in and out of the Virtualbox window without pressing the right CTRL key on the keyboard, as I had to do previously. When I click on Machine and select "Pause" I am able to see my login information, but the screen is frozen and I am not able to enter my password - the login information is inactive and clicking on it doesn't activate it. I clicked on Machine and "Reset" after which the operating system rebooted. Once the system reloaded, I noticed that the screen now sized to the size of the page even though the screen was still black and I am still not able to login using my user information.
|
Out of interest, what is your host system (the one you're running VirtualBox on)?
|
I am running Windows 10
|
Quote:
https://www.if-not-true-then-false.c...-red-hat-rhel/ (assuming that you meant CentOS when you said "Centros") |
Thanks hydrurga, will try that with a new installation - an yes, I did mean Centros 7
|
Quote:
|
I tried to run the command on the guide, but I got the same error message as before after entering the last command "./VBoxLinuxAdditions.run"
All the commands seem to take and I followed the guide step by step. The only different was when I click on "Device" I don't have an option for "Install Guest Additions", instead it says "Insert Guest Additions CD Image". Once I click on this it says run. It then runs the script for Guest Additions where I first saw the error message. After that I continued to enter the commands according to the guide. CentOS not Centros -- sorry was rushed. |
Since you have updated the system, when you boot, you should get a choice of kernels. Use your arrow key to select an earlier kernel and see if it will boot. If it does, try running an uninstall of those packages:
Code:
sudo yum remove gcc make perl kernel-devel I've got to say, I've ran CentOS 7 in VirtualBox and was able to get the Guest Additions to install. If I remember correctly, however, it was not without its trials. |
I reinstalled a fresh version of CentOS 7 and followed the tutorial from the following website - rebooting after each command as you suggested.
https://www.megajason.com/2017/06/10...s-on-centos-7/ The good news is that guest additions appear to be installed successfully and I no longer got the following error message: "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-devel kernel-devel-3.10.0-693.17.1.el7.x86_64" The bad news is that I now get a black screen where I am no longer able to log in to CentOS Linux. Guest additions does seem to be working to some extent - I now get mouse pointer integration so I no longer have to press the CTRL key to move the mouse outside the VirtualBox window. |
OK, which options did you take on the install? After seeing your post yesterday, I went home and did a new install of CentOS in VirtualBox and chose "Gnome Desktop" in the options. Then I inserted the Guest Additions CD via the menu and ran it. It installed without an issue, and I can still see things on my screen.
Again, boot to an earlier kernel. If you can get to a terminal, run: Code:
uname-a (NOTE: I know this will return the kernel you've booted to, not the latest installed.) |
I appreciate the help. This may sound like a stupid question, but how do I boot an earlier version of the Kernel. I tried to do that when the system was booting up. There was a few seconds during the early part of the boot up process where I could select one of three options, I can't remember what they are at the moment and I am reinstalling the software now so I can't look. Going from memory, the option at the top was the default option, so i believe it is the latest kernel. The one in the middle looked like an earlier kernel and the option at the bottom looked like some kind of safe mode. I selected the one in the middle and it just booted to a black screen with a cursor blinking.
Unfortunately, I am unable to boot up the latest installation - it just takes me to a black screen. If you don't mind let me know how I can boot up an earlier kernel if I did not do that correctly. Thanks |
You were exactly correct.
The one at top is the latest kernel. If there are only the three, then the one in the middle is the original kernel you installed. As there are more kernel revisions, and you run 'sudo yum update' you'll get more choices. If both the latest kernel and the older kernel are both booting to a blank screen, you can try the 'rescue' option on the kernel selection screen. It should get you to a desktop. Open a terminal, uninstall the last thing you installed and reboot. Keep it up until you can boot to a desktop normally and we'll have a better idea as to what is causing you grief. |
All times are GMT -5. The time now is 06:44 PM. |