Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    After running above steps, had to restart guest system before reinstalling vbox guest additions again.
    – Reddy
    Commented Jun 2, 2015 at 11:14
  • This was the right package to install, however recompiling the kernel modules required root privileges, and running something in root will lose your environment variables (including KERN_DIR). I instead did sudo -s followed by export KERN_DIR=/usr/src/kernels/XXX but I'm sure there's a better way to persist variables into sudo mode
    – Migwell
    Commented Jan 8, 2016 at 0:14
  • In my case (CentOS 6.7) [uname -r] is [2.6.32-573.el6.x86_64], but [ls /usr/src/kernels/] prints [2.6.32-573.22.1.el6.x86_64] So be careful and use actual existing dir name
    – jnr
    Commented Apr 8, 2016 at 13:09
  • 1
    source ~/.bashrc to set KERN_DIR in the current environment without having to restart.
    – Justin
    Commented Aug 16, 2016 at 14:16
  • I got errors that its not a directory. Note that it needs a slash at the end.. echo export KERN_DIR=/usr/src/kernels/uname -r/ >> ~/.bashrc Commented Sep 30, 2016 at 5:41