LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2018, 07:38 PM   #1
oedipus88
LQ Newbie
 
Registered: Mar 2018
Posts: 7

Rep: Reputation: Disabled
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.
 
Old 03-06-2018, 08:43 AM   #2
resuni
Member
 
Registered: Oct 2009
Location: Colorado, USA
Distribution: I use Arch btw
Posts: 142

Rep: Reputation: 12
The problem is described here:

Quote:
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
You're missing packages required to build the guest additions kernel module. Best way to fix this is to completely update the system (so you're building the kernel module against the latest kernel), install the missing packages, and try installing guest additions again.

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
reboot
Install the missing packages.
Code:
yum install -y gcc make perl kernel-devel
Try installing guest additions again. It may want you to reboot again if installation is successful.
 
Old 03-06-2018, 12:17 PM   #3
oedipus88
LQ Newbie
 
Registered: Mar 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-06-2018, 12:18 PM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Out of interest, what is your host system (the one you're running VirtualBox on)?
 
Old 03-06-2018, 12:20 PM   #5
oedipus88
LQ Newbie
 
Registered: Mar 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
I am running Windows 10
 
Old 03-06-2018, 12:26 PM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by oedipus88 View Post
I am running Windows 10
Thanks. Try this guide:

https://www.if-not-true-then-false.c...-red-hat-rhel/

(assuming that you meant CentOS when you said "Centros")
 
Old 03-06-2018, 12:48 PM   #7
oedipus88
LQ Newbie
 
Registered: Mar 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks hydrurga, will try that with a new installation - an yes, I did mean Centros 7
 
Old 03-06-2018, 01:21 PM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by oedipus88 View Post
Thanks hydrurga, will try that with a new installation - an yes, I did mean Centros 7
I've never heard of Centros. What is the project's home page?
 
Old 03-06-2018, 07:06 PM   #9
oedipus88
LQ Newbie
 
Registered: Mar 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-07-2018, 01:38 AM   #10
killingthemonkey
Member
 
Registered: Mar 2011
Location: Winston-Salem, NC
Distribution: Fedora, CentOS, Linux Mint
Posts: 259

Rep: Reputation: 24
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
If you are successful to this point, try booting to the latest kernel again. Then, try to install each of those packages individually, with a reboot in between to see where the error is.

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.
 
Old 03-07-2018, 11:03 AM   #11
oedipus88
LQ Newbie
 
Registered: Mar 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-07-2018, 06:45 PM   #12
killingthemonkey
Member
 
Registered: Mar 2011
Location: Winston-Salem, NC
Distribution: Fedora, CentOS, Linux Mint
Posts: 259

Rep: Reputation: 24
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
Please give us the output from that.
(NOTE: I know this will return the kernel you've booted to, not the latest installed.)
 
Old 03-07-2018, 07:09 PM   #13
oedipus88
LQ Newbie
 
Registered: Mar 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-07-2018, 07:50 PM   #14
killingthemonkey
Member
 
Registered: Mar 2011
Location: Winston-Salem, NC
Distribution: Fedora, CentOS, Linux Mint
Posts: 259

Rep: Reputation: 24
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Issues trying to install Virtual Box Guest Additions on RHEL v6.5 in Virtual Box JockVSJock Linux - Virtualization and Cloud 4 07-13-2015 09:14 PM
[SOLVED] Centros-6.2 Install HP J5780 all-in-one printer JerryRobinson Linux - Hardware 3 04-19-2012 08:13 AM
[SOLVED] Problem running Virtual box max_arbit Slackware 9 08-30-2010 10:25 PM
Running Virtual box cjrissler Linux - Newbie 5 01-11-2010 11:05 PM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration