Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #190733 > unrolled thread

vbox cannot find headers, although they are installed

Started byHarry Putnam <reader@newsguy.com>
First post2018-01-07 02:40 +0100
Last post2018-01-09 18:20 +0100
Articles 7 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  vbox cannot find headers, although they are installed Harry Putnam <reader@newsguy.com> - 2018-01-07 02:40 +0100
    Re: vbox cannot find headers, although they are installed "x9p" <debian@x9p.org> - 2018-01-07 15:30 +0100
    Re: vbox cannot find headers, although they are installed Eike Lantzsch <zp6cge@gmx.net> - 2018-01-08 00:20 +0100
      Re: vbox cannot find headers, although they are installed Harry Putnam <reader@newsguy.com> - 2018-01-08 18:30 +0100
      Re: vbox cannot find headers, although they are installed Harry Putnam <reader@newsguy.com> - 2018-01-08 18:40 +0100
    Re: vbox cannot find headers, although they are installed Mike Kupfer <mkupfer@alum.berkeley.edu> - 2018-01-09 06:50 +0100
    Re: vbox cannot find headers, although they are installed Curt <curty@free.fr> - 2018-01-09 18:20 +0100

#190733 — vbox cannot find headers, although they are installed

FromHarry Putnam <reader@newsguy.com>
Date2018-01-07 02:40 +0100
Subjectvbox cannot find headers, although they are installed
Message-ID<v586l-Na-1@gated-at.bofh.it>
Having a problem getting the vbox guest additions on a `testing'
install to allow for larger monitor resolution.

When I attempt to install the additions the ouput says it cannot find
the headers for the running kernel.

I have checked, rechecked and reinstalled the headers but still get
the message that they cannot be found and the kernel module build then
fails.

(Note: All debian systems mentioned below are running as guests on an
`openindiana' (a solaris offshoot) host)

(Full output of attempted guest additions install are at the end)

But briefly . . . . 
>From the host with the failure:

  uname -r 4.14.0-2-amd64

  aptitude search headers |grep ^i

  i  linux-headers-4.14.0-2-amd64 - Header files for Linux 4.14.0-2-amd64
  i A linux-headers-4.14.0-2-common - Common header files for Linux 4.14.0-2

,----
| On two other debian systems (both running stretch, not `testing') everything works as
| expected and the kernel module build succeeds... monitor settings then
| act accordingly.
| 
| From 2 stretch hosts:
| Of course, it is a different kernel and headers (4.9.0-5-amd64) on the
| `stretch' systems and with like named header files.
| 
|   i A linux-headers-4.9.0-5-common
|   i A linux-headers-4.9.0-5-amd64
| 
| With those in place on the stretch systems the guest additions build
| just like they should.
`----

What am I missing?

=================================================================

Terminal output from attempting install of guest additions
=================================================================

[Did not post the full log referred to in the output below... it is
very long... but I can post it if necessary]

root # bash ./VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.40 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.40 of VirtualBox Guest Additions...
Removing existing VirtualBox non-DKMS kernel modules ...done.
update-initramfs: Generating /boot/initrd.img-4.14.0-2-amd64
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.

[toc] | [next] | [standalone]


#190747

From"x9p" <debian@x9p.org>
Date2018-01-07 15:30 +0100
Message-ID<v5k7v-iX-1@gated-at.bofh.it>
In reply to#190733
On Sat, January 6, 2018 11:36 pm, Harry Putnam wrote:
...
> (Look at /var/log/vboxadd-install.log to find out what went wrong)
...

the line above can explain a lot.

cheers.

--
x9p | PGP : 0x03B50AF5EA4C8D80 / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

"I don't know where I'm going from here, but I promise it won't be boring." - David Bowie

[toc] | [prev] | [next] | [standalone]


#190771

FromEike Lantzsch <zp6cge@gmx.net>
Date2018-01-08 00:20 +0100
Message-ID<v5soq-6a7-1@gated-at.bofh.it>
In reply to#190733
On Saturday, January 6, 2018 8:36:38 PM -03 Harry Putnam wrote:
> Having a problem getting the vbox guest additions on a `testing'
> install to allow for larger monitor resolution.
> 
> When I attempt to install the additions the ouput says it cannot find
> the headers for the running kernel.
> 
> I have checked, rechecked and reinstalled the headers but still get
> the message that they cannot be found and the kernel module build then
> fails.
> 
> (Note: All debian systems mentioned below are running as guests on an
> `openindiana' (a solaris offshoot) host)
> 
> (Full output of attempted guest additions install are at the end)
> 
> But briefly . . . .
> 
> >From the host with the failure:
>   uname -r 4.14.0-2-amd64
This is not Stretch? Stretch is still with 4.9.0-5-amd64.
> 
>   aptitude search headers |grep ^i
> 
>   i  linux-headers-4.14.0-2-amd64 - Header files for Linux 4.14.0-2-amd64
>   i A linux-headers-4.14.0-2-common - Common header files for Linux 4.14.0-2
> 
> ,----
> 
> | On two other debian systems (both running stretch, not `testing')
> | everything works as expected and the kernel module build succeeds...
> | monitor settings then act accordingly.
> | 
> | From 2 stretch hosts:
> | Of course, it is a different kernel and headers (4.9.0-5-amd64) on the
> | `stretch' systems and with like named header files.
> | 
> |   i A linux-headers-4.9.0-5-common
> |   i A linux-headers-4.9.0-5-amd64
> | 
> | With those in place on the stretch systems the guest additions build
> | just like they should.
> 
> `----
> 
> What am I missing?

Did you by any chance install a kernel higher than 4.14.0-2 to check it out, 
then went back to 4.14.0-2 or installed 4.14.0 and then went back to 4.9.0?
In that case VBox is most probably still looking for the headers of the higher 
kernel version and cannot find them. I ran into that problem before.
In that case you will have to deinstall VBox completely and install it again. 
You can retain the virtual installations and later incorporate them into VBox 
again.
Cheers
Eike

> 
> =================================================================
> 
> Terminal output from attempting install of guest additions
> =================================================================
> 
> [Did not post the full log referred to in the output below... it is
> very long... but I can post it if necessary]
> 
> root # bash ./VBoxLinuxAdditions.run
> Verifying archive integrity... All good.
> Uncompressing VirtualBox 5.0.40 Guest Additions for Linux............
> VirtualBox Guest Additions installer
> Removing installed version 5.0.40 of VirtualBox Guest Additions...
> Removing existing VirtualBox non-DKMS kernel modules ...done.
> update-initramfs: Generating /boot/initrd.img-4.14.0-2-amd64
> Copying additional installer modules ...
> Installing additional modules ...
> Removing existing VirtualBox non-DKMS kernel modules ...done.
> Building the VirtualBox Guest Additions kernel modules
> The headers for the current running kernel were not found. If the following
> module compilation fails then this could be the reason.
> 
> Building the main Guest Additions module ...fail!
> (Look at /var/log/vboxadd-install.log to find out what went wrong)
> Doing non-kernel setup of the Guest Additions ...done.

[toc] | [prev] | [next] | [standalone]


#190811

FromHarry Putnam <reader@newsguy.com>
Date2018-01-08 18:30 +0100
Message-ID<v5Jpg-o0-7@gated-at.bofh.it>
In reply to#190771
Eike Lantzsch <zp6cge@gmx.net> writes:

Harry wrote:
>> What am I missing?
>
Eike Replied:
> Did you by any chance install a kernel higher than 4.14.0-2 to check it out, 
> then went back to 4.14.0-2 or installed 4.14.0 and then went back to 4.9.0?
> In that case VBox is most probably still looking for the headers of the higher 
> kernel version and cannot find them. I ran into that problem before.
> In that case you will have to deinstall VBox completely and install it again. 
> You can retain the virtual installations and later incorporate them into VBox 
> again.

No, I've only ever installed kernels when an upgrade included a new
one... that is what happened in this case to get to 4.14*.


Is it possible that Debian just doesn't know where to look for the
header files?

Seems unlikely since two `stretch' systems, following a full-upgrade
had no such problems even though new kernels were installed as part of
that upgrade.

I see notations regarding more than one error in the full log output I
posted in this thread... but am not savvy enough to know what they
mean.

Early on:

,----
| grep: /lib/modules/4.14.0-2-amd64/build/include/linux/version.h: No such file or directory
| make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.14.0-2-amd64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
| make -C /usr/src/linux-headers-4.14.0-2-amd64 KBUILD_SRC=/usr/src/linux-headers-4.14.0-2-common \
| -f /usr/src/linux-headers-4.14.0-2-common/Makefile modules
| test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
| echo >&2;							\
| echo >&2 "  ERROR: Kernel configuration is invalid.";		\
| echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
| echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
| echo >&2 ;							\
| /bin/false)
|
| [...]
`----


and then at the end:

,----
| [...]
| 
| /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:313:47: error: implicit declaration of function ‘set_pages_x’; did you mean ‘get_page’? [-Werror=implicit-function-declaration]
|  # define MY_SET_PAGES_EXEC(pPages, cPages)    set_pages_x(pPages, cPages)
|                                                ^
| /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:444:13: note: in expansion of macro ‘MY_SET_PAGES_EXEC’
|              MY_SET_PAGES_EXEC(&paPages[iPage], 1);
|              ^~~~~~~~~~~~~~~~~
| /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function ‘VBoxGuest_RTMemContFree’:
| /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:314:47: error: implicit declaration of function ‘set_pages_nx’; did you mean ‘set_page_node’? [-Werror=implicit-function-declaration]
|  # define MY_SET_PAGES_NOEXEC(pPages, cPages)  set_pages_nx(pPages, cPages)
|                                                ^
| /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:492:13: note: in expansion of macro ‘MY_SET_PAGES_NOEXEC’
|              MY_SET_PAGES_NOEXEC(&paPages[iPage], 1);
|              ^~~~~~~~~~~~~~~~~~~
| cc1: some warnings being treated as errors
| /usr/src/linux-headers-4.14.0-2-common/scripts/Makefile.build:319: recipe for target '/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o' failed
| make[4]: *** [/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o] Error 1
| /usr/src/linux-headers-4.14.0-2-common/Makefile:1522: recipe for target '_module_/tmp/vbox.0' failed
| make[3]: *** [_module_/tmp/vbox.0] Error 2
| Makefile:146: recipe for target 'sub-make' failed
| make[2]: *** [sub-make] Error 2
| Makefile:8: recipe for target 'all' failed
| make[1]: *** [all] Error 2
| /tmp/vbox.0/Makefile.include.footer:79: recipe for target 'vboxguest' failed
| make: *** [vboxguest] Error 2
| Creating user for the Guest Additions.
| Creating udev rule for the Guest Additions kernel module.
`----

Any help on what those indicate needs doing?

[toc] | [prev] | [next] | [standalone]


#190812

FromHarry Putnam <reader@newsguy.com>
Date2018-01-08 18:40 +0100
Message-ID<v5JyV-rn-11@gated-at.bofh.it>
In reply to#190771
Eike Lantzsch <zp6cge@gmx.net> writes:

> On Saturday, January 6, 2018 8:36:38 PM -03 Harry Putnam wrote:
>> Having a problem getting the vbox guest additions on a `testing'
>> install to allow for larger monitor resolution.
>> 
>> When I attempt to install the additions the ouput says it cannot find
>> the headers for the running kernel.
>> 
>> I have checked, rechecked and reinstalled the headers but still get
>> the message that they cannot be found and the kernel module build then
>> fails.
>> 
>> (Note: All debian systems mentioned below are running as guests on an
>> `openindiana' (a solaris offshoot) host)
>> 
>> (Full output of attempted guest additions install are at the end)
>> 
>> But briefly . . . .
>> 


Harry wrote:

>> >From the host with the failure:
>>   uname -r 4.14.0-2-amd64

Eike responded:

> This is not Stretch? Stretch is still with 4.9.0-5-amd64.

I overlooked your comment above in my previous response

Sorry I wasn't clear... but I did indicate in OP that the problem is
on a `testing' host:

Harry wrote in OP... first lines

,----
|   Having a problem getting the vbox guest additions on a `testing'
|                                                           ^^^^^^^  
|   install to allow for larger monitor resolution.
`----

I went on to say that I am running two `stretch' hosts that did not
display this problem... even though all hosts have the proper header
files installed.

[toc] | [prev] | [next] | [standalone]


#190826

FromMike Kupfer <mkupfer@alum.berkeley.edu>
Date2018-01-09 06:50 +0100
Message-ID<v5UXn-8cg-3@gated-at.bofh.it>
In reply to#190733
Harry Putnam wrote:

> root # bash ./VBoxLinuxAdditions.run 
> Verifying archive integrity... All good.
> Uncompressing VirtualBox 5.0.40 Guest Additions for Linux............

5.0.40 is pretty old, and Googling for "virtualbox linux 4.14 guest"
shows a couple reports about the Guest Additions not building with a
4.14 kernel.  Try the latest 5.2.x GA.

mike

[toc] | [prev] | [next] | [standalone]


#190851

FromCurt <curty@free.fr>
Date2018-01-09 18:20 +0100
Message-ID<v65J7-6V0-3@gated-at.bofh.it>
In reply to#190733
On 2018-01-07, Harry Putnam <reader@newsguy.com> wrote:
>
> Building the main Guest Additions module ...fail!
> (Look at /var/log/vboxadd-install.log to find out what went wrong)
> Doing non-kernel setup of the Guest Additions ...done.
>

You have performed

 apt-get install build-essential module-assistant

and

 m-a prepare

as suggested by virtualboxes.org?

-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web